The following patches introduce the FIXME_ONCE macro which suppresses repeated FIXMEs into WARNings. The current FIXME macro tends to be insufficient in cases where a developer wishes to suppresses fixmes other than the first. It is based on the vkd3d version.
v2: Fix programming mistakes, fixed a test and some formating
David Kahurani (21): include/wine: suppress subsequent FIXMEs into WARNINGs dlls/kernelbase: Use FIXME_ONCE dlls/ntdll: Use FIXME_ONCE dlls/gdiplus: Use FIXME_ONCE dlls/kernel32: Use FIXME_ONCE dlls/msvcrt: Use FIXME_ONCE dlls/dwrite: Use FIXME_ONCE dlls/gdi32: Use FIXME_ONCE dlls/advapi32: Use FIXME_ONCE dlls/dxgi: Use FIXME_ONCE dlls/iphlpapi: Use FIXME_ONCE dlls/jscript: Use FIXME_ONCE dlls/msctf: Use FIXME_ONCE dlls/ntoskrnl.exe: Use FIXME_ONCE dlls/rpcrt4: Use FIXME_ONCE dlls/sechost: Use FIXME_ONCE dlls/wbemprox: Use FIXME_ONCE dlls/winecoreaudio.drv: Use FIXME_ONCE dlls/wined3d: Use FIXME_ONCE dlls/wtsapi32: Use FIXME_ONCE dlls/xinput1_3: Use FIXME_ONCE
dlls/advapi32/eventlog.c | 3 +-- dlls/dwrite/analyzer.c | 5 +---- dlls/dwrite/font.c | 5 +---- dlls/dxgi/adapter.c | 4 +--- dlls/gdi32/uniscribe/opentype.c | 20 +++++--------------- dlls/gdi32/uniscribe/usp10.c | 6 ++---- dlls/gdiplus/graphics.c | 26 +++++++------------------- dlls/gdiplus/graphicspath.c | 4 +--- dlls/gdiplus/metafile.c | 9 ++------- dlls/iphlpapi/iphlpapi_main.c | 4 +--- dlls/jscript/global.c | 4 +--- dlls/kernel32/console.c | 4 +--- dlls/kernel32/process.c | 3 +-- dlls/kernelbase/locale.c | 10 ++++------ dlls/kernelbase/main.c | 5 +---- dlls/kernelbase/process.c | 3 +-- dlls/kernelbase/sync.c | 3 +-- dlls/kernelbase/thread.c | 3 +-- dlls/msctf/inputprocessor.c | 9 ++------- dlls/msvcrt/concurrency.c | 3 +-- dlls/msvcrt/cpp.c | 3 +-- dlls/ntdll/misc.c | 4 +--- dlls/ntdll/unix/socket.c | 19 ++++--------------- dlls/ntdll/unix/system.c | 8 +++----- dlls/ntdll/unix/thread.c | 3 +-- dlls/ntdll/unix/virtual.c | 9 +++------ dlls/ntoskrnl.exe/ntoskrnl.c | 3 +-- dlls/rpcrt4/ndr_marshall.c | 10 ++-------- dlls/sechost/trace.c | 3 +-- dlls/wbemprox/class.c | 6 ++---- dlls/winecoreaudio.drv/audiounit.c | 6 ++---- dlls/wined3d/state.c | 4 +--- dlls/wtsapi32/wtsapi32.c | 3 +-- dlls/xinput1_3/main.c | 4 +--- include/wine/debug.h | 29 +++++++++++++++++++++++++++++ 35 files changed, 89 insertions(+), 158 deletions(-)
In situations where it is preferable to only print a FIXME once, suppress any subsequent calls to the FIXME into WARNINGs.
Signed-off-by: David Kahurani k.kahurani@gmail.com --- include/wine/debug.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
diff --git a/include/wine/debug.h b/include/wine/debug.h index 6aac7fe..a637ea2 100644 --- a/include/wine/debug.h +++ b/include/wine/debug.h @@ -85,6 +85,15 @@ struct __wine_debug_channel const enum __wine_debug_class __dbcl = __WINE_DBCL##dbcl; \ __WINE_DBG_LOG
+#define __WINE_DPRINTF_ONCE(dbcl,dbc2,dbch) \ + do { if(__WINE_GET_DEBUGGING(dbcl,(dbch))) { \ + static BOOL __wine_next_time_level;\ + struct __wine_debug_channel * const __dbch = (dbch); \ + const enum __wine_debug_class __dbcl = \ + __wine_next_time_level ? __WINE_DBCL##dbc2 : __WINE_DBCL##dbcl; \ + __wine_next_time_level = TRUE;\ + __WINE_DBG_LOG + #define __WINE_DBG_LOG(args...) \ wine_dbg_log( __dbcl, __dbch, __FUNCTION__, args); } } while(0)
@@ -115,6 +124,15 @@ struct __wine_debug_channel const enum __WINE_DEBUG_CLASS __dbcl = __WINE_DBCL##dbcl; \ __WINE_DBG_LOG
+#define __WINE_DPRINTF_ONCE(dbcl,dbc2,dbch) \ + do { if(__WINE_GET_DEBUGGING(dbcl,(dbch))) { \ + static BOOL __wine_next_time_level;\ + struct __wine_debug_channel * const __dbch = (dbch); \ + const enum __wine_debug_class __dbcl = \ + next_time_level ? __WINE_DBCL##dbc2 : __WINE_DBCL##dbcl; \ + __wine_next_time_level = TRUE;\ + __WINE_DBG_LOG + #define __WINE_DBG_LOG(...) \ wine_dbg_log( __dbcl, __dbch, __func__, __VA_ARGS__); } } while(0)
@@ -134,6 +152,15 @@ struct __wine_debug_channel
#else /* !__GNUC__ && !__SUNPRO_C */
+#define __WINE_DPRINTF_ONCE(dbcl,dbc2,dbch) \ + static BOOL __wine_next_time_level;\ + const enum __wine_debug_class __dbcl = \ + __wine_next_time_level ? __WINE_DBCL##dbc2 : __WINE_DBCL##dbc1;\ + (!__WINE_GET_DEBUGGING(dbcl,(dbch)) || \ + (wine_dbg_log(__dbcl,(dbch),__FILE__,"%d: ",__LINE__) == -1)) ? \ + (void)0 : (void)wine_dbg_printf \ + __wine_next_time_level = TRUE; + #define __WINE_DPRINTF(dbcl,dbch) \ (!__WINE_GET_DEBUGGING(dbcl,(dbch)) || \ (wine_dbg_log(__WINE_DBCL##dbcl,(dbch),__FILE__,"%d: ",__LINE__) == -1)) ? \ @@ -487,6 +514,7 @@ static inline const char *wine_dbgstr_variant( const VARIANT *v )
#ifndef WINE_FIXME #define WINE_FIXME __WINE_DPRINTF(_FIXME,__wine_dbch___default) +#define WINE_FIXME_ONCE __WINE_DPRINTF_ONCE(_FIXME,_WARN,__wine_dbch___default) #define WINE_FIXME_(ch) __WINE_DPRINTF(_FIXME,&__wine_dbch_##ch) #endif #define WINE_FIXME_ON(ch) __WINE_IS_DEBUG_ON(_FIXME,&__wine_dbch_##ch) @@ -526,6 +554,7 @@ static inline const char *debugstr_variant( const VARIANT *v ) { return wine_dbg #define WARN_ON(ch) WINE_WARN_ON(ch)
#define FIXME WINE_FIXME +#define FIXME_ONCE WINE_FIXME_ONCE #define FIXME_(ch) WINE_FIXME_(ch) #define FIXME_ON(ch) WINE_FIXME_ON(ch)
On 18-10-2021 14:58, David Kahurani wrote:
+#define __WINE_DPRINTF_ONCE(dbcl,dbc2,dbch) \
- static BOOL __wine_next_time_level;\
- const enum __wine_debug_class __dbcl = \
- __wine_next_time_level ? __WINE_DBCL##dbc2 : __WINE_DBCL##dbc1;\
- (!__WINE_GET_DEBUGGING(dbcl,(dbch)) || \
(wine_dbg_log(__dbcl,(dbch),__FILE__,"%d: ",__LINE__) == -1)) ? \
(void)0 : (void)wine_dbg_printf \
__wine_next_time_level = TRUE;
Hi David,
I don't think this will work. First because variables should be declared at the beginning of a scope, and second because if there are two FIXME_ONCE in one scope __dbcl and __wine_next_time_level will be declared twice.
I didn't check the rest of the patch, but this stood out to me.
Also, Chip asked you to not send so many patches at once. Please first try to get only this patch and one of the other patches in.
Sven
On Mon, Oct 18, 2021 at 4:12 PM Sven Baars sven.wine@gmail.com wrote:
On 18-10-2021 14:58, David Kahurani wrote:
+#define __WINE_DPRINTF_ONCE(dbcl,dbc2,dbch) \
- static BOOL __wine_next_time_level;\
- const enum __wine_debug_class __dbcl = \
- __wine_next_time_level ? __WINE_DBCL##dbc2 : __WINE_DBCL##dbc1;\
- (!__WINE_GET_DEBUGGING(dbcl,(dbch)) || \
(wine_dbg_log(__dbcl,(dbch),__FILE__,"%d: ",__LINE__) == -1)) ? \
(void)0 : (void)wine_dbg_printf \
__wine_next_time_level = TRUE;
Hi David,
Hello,
I don't think this will work. First because variables should be declared at the beginning of a scope, and second because if there are two FIXME_ONCE in one scope __dbcl and __wine_next_time_level will be declared twice.
Should binding this into a do { } while (0) loop be enough? It looks like it should to me.
I didn't check the rest of the patch, but this stood out to me.
Also, Chip asked you to not send so many patches at once. Please first try to get only this patch and one of the other patches in.
Well, he said in the future so my assumption was that it did not affect this patchset probably because these patches are easy enough. All the subsequent patches can be bundled into one, considered that but then again they go into different subsystems. Okay, only two patches will be sent next time.
Sven
introduce FIXME_ONCE
Signed-off-by: David Kahurani k.kahurani@gmail.com --- dlls/kernelbase/locale.c | 10 ++++------ dlls/kernelbase/main.c | 5 +---- dlls/kernelbase/process.c | 3 +-- dlls/kernelbase/sync.c | 3 +-- dlls/kernelbase/thread.c | 3 +-- 5 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/dlls/kernelbase/locale.c b/dlls/kernelbase/locale.c index 1c2f4dd..f1ceaa4 100644 --- a/dlls/kernelbase/locale.c +++ b/dlls/kernelbase/locale.c @@ -3061,7 +3061,6 @@ INT WINAPI CompareStringEx( const WCHAR *locale, DWORD flags, const WCHAR *str1, SORT_DIGITSASNUMBERS | 0x10000000; /* 0x10000000 is related to diacritics in Arabic, Japanese, and Hebrew */ INT ret; - static int once;
if (version) FIXME( "unexpected version parameter\n" ); if (reserved) FIXME( "unexpected reserved value\n" ); @@ -3081,7 +3080,7 @@ INT WINAPI CompareStringEx( const WCHAR *locale, DWORD flags, const WCHAR *str1,
if (flags & semistub_flags) { - if (!once++) FIXME( "semi-stub behavior for flag(s) 0x%x\n", flags & semistub_flags ); + FIXME_ONCE( "semi-stub behavior for flag(s) 0x%x\n", flags & semistub_flags ); }
if (len1 < 0) len1 = lstrlenW(str1); @@ -5237,8 +5236,8 @@ DWORD WINAPI DECLSPEC_HOTPATCH IsValidNLSVersion( NLS_FUNCTION func, const WCHAR */ INT WINAPI DECLSPEC_HOTPATCH LCIDToLocaleName( LCID lcid, WCHAR *name, INT count, DWORD flags ) { - static int once; - if (flags && !once++) FIXME( "unsupported flags %x\n", flags ); + if (flags) + FIXME_ONCE( "unsupported flags %x\n", flags );
return GetLocaleInfoW( lcid, LOCALE_SNAME | LOCALE_NOUSEROVERRIDE, name, count ); } @@ -5259,8 +5258,7 @@ INT WINAPI DECLSPEC_HOTPATCH LCMapStringEx( const WCHAR *locale, DWORD flags, co if (reserved) FIXME( "unsupported reserved pointer %p\n", reserved ); if (handle) { - static int once; - if (!once++) FIXME( "unsupported lparam %lx\n", handle ); + FIXME_ONCE( "unsupported lparam %lx\n", handle ); }
if (!src || !srclen || dstlen < 0) diff --git a/dlls/kernelbase/main.c b/dlls/kernelbase/main.c index b90ee1c..c032b31 100644 --- a/dlls/kernelbase/main.c +++ b/dlls/kernelbase/main.c @@ -219,10 +219,7 @@ BOOL WINAPI QuirkIsEnabled(void *arg) */ BOOL WINAPI QuirkIsEnabled3(void *unk1, void *unk2) { - static int once; - - if (!once++) - FIXME("(%p, %p) stub!\n", unk1, unk2); + FIXME_ONCE("(%p, %p) stub!\n", unk1, unk2);
return FALSE; } diff --git a/dlls/kernelbase/process.c b/dlls/kernelbase/process.c index 5973eb7..35829b5 100644 --- a/dlls/kernelbase/process.c +++ b/dlls/kernelbase/process.c @@ -1046,8 +1046,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH ProcessIdToSessionId( DWORD pid, DWORD *id ) */ BOOL WINAPI DECLSPEC_HOTPATCH QueryProcessCycleTime( HANDLE process, ULONG64 *cycle ) { - static int once; - if (!once++) FIXME( "(%p,%p): stub!\n", process, cycle ); + FIXME_ONCE( "(%p,%p): stub!\n", process, cycle ); SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); return FALSE; } diff --git a/dlls/kernelbase/sync.c b/dlls/kernelbase/sync.c index ab963c6..73af62f 100644 --- a/dlls/kernelbase/sync.c +++ b/dlls/kernelbase/sync.c @@ -777,8 +777,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH SetWaitableTimerEx( HANDLE handle, const LARGE_INT PTIMERAPCROUTINE callback, LPVOID arg, REASON_CONTEXT *context, ULONG tolerabledelay ) { - static int once; - if (!once++) FIXME( "(%p, %p, %d, %p, %p, %p, %d) semi-stub\n", + FIXME_ONCE( "(%p, %p, %d, %p, %p, %p, %d) semi-stub\n", handle, when, period, callback, arg, context, tolerabledelay );
return SetWaitableTimer( handle, when, period, callback, arg, FALSE ); diff --git a/dlls/kernelbase/thread.c b/dlls/kernelbase/thread.c index 9b97c4a..dd59036 100644 --- a/dlls/kernelbase/thread.c +++ b/dlls/kernelbase/thread.c @@ -384,8 +384,7 @@ DWORD WINAPI DECLSPEC_HOTPATCH QueueUserAPC( PAPCFUNC func, HANDLE thread, ULONG */ BOOL WINAPI DECLSPEC_HOTPATCH QueryThreadCycleTime( HANDLE thread, ULONG64 *cycle ) { - static int once; - if (!once++) FIXME( "(%p,%p): stub!\n", thread, cycle ); + FIXME_ONCE( "(%p,%p): stub!\n", thread, cycle ); SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); return FALSE; }
introduce FIXME_ONCE
Signed-off-by: David Kahurani k.kahurani@gmail.com --- dlls/ntdll/misc.c | 4 +--- dlls/ntdll/unix/socket.c | 19 ++++--------------- dlls/ntdll/unix/system.c | 8 +++----- dlls/ntdll/unix/thread.c | 3 +-- dlls/ntdll/unix/virtual.c | 9 +++------ 5 files changed, 12 insertions(+), 31 deletions(-)
diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c index 4b590b7..b59d163 100644 --- a/dlls/ntdll/misc.c +++ b/dlls/ntdll/misc.c @@ -319,9 +319,7 @@ void WINAPI WinSqmSetDWORD(HANDLE session, DWORD datapoint_id, DWORD datapoint_v */ ULONG WINAPI EtwEventActivityIdControl(ULONG code, GUID *guid) { - static int once; - - if (!once++) FIXME("0x%x, %p: stub\n", code, guid); + FIXME_ONCE("0x%x, %p: stub\n", code, guid); return ERROR_SUCCESS; }
diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c index 2e79b9b..6f0de26 100644 --- a/dlls/ntdll/unix/socket.c +++ b/dlls/ntdll/unix/socket.c @@ -1728,10 +1728,7 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc } #else { - static int once; - - if (!once++) - FIXME( "IP_DONTFRAGMENT is not supported on this platform\n" ); + FIXME_ONCE( "IP_DONTFRAGMENT is not supported on this platform\n" ); ret = 0; /* fake success */ } #endif @@ -1752,10 +1749,7 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc } #else { - static int once; - - if (!once++) - FIXME( "IP_DONTFRAGMENT is not supported on this platform\n" ); + FIXME_ONCE( "IP_DONTFRAGMENT is not supported on this platform\n" ); return STATUS_SUCCESS; /* fake success */ } #endif @@ -1934,10 +1928,7 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc } #else { - static int once; - - if (!once++) - FIXME( "IPV6_DONTFRAGMENT is not supported on this platform\n" ); + FIXME_ONCE( "IPV6_DONTFRAGMENT is not supported on this platform\n" ); ret = 0; /* fake success */ } #endif @@ -1958,10 +1949,8 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc } #else { - static int once; + FIXME_ONCE( "IPV6_DONTFRAGMENT is not supported on this platform\n" );
- if (!once++) - FIXME( "IPV6_DONTFRAGMENT is not supported on this platform\n" ); return STATUS_SUCCESS; /* fake success */ } #endif diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c index 82c9f0d..0168efa 100644 --- a/dlls/ntdll/unix/system.c +++ b/dlls/ntdll/unix/system.c @@ -2399,7 +2399,6 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class, case SystemPerformanceInformation: /* 2 */ { SYSTEM_PERFORMANCE_INFORMATION spi; - static BOOL fixme_written = FALSE;
get_performance_info( &spi ); len = sizeof(spi); @@ -2409,10 +2408,9 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class, else memcpy( info, &spi, len); } else ret = STATUS_INFO_LENGTH_MISMATCH; - if(!fixme_written) { - FIXME("info_class SYSTEM_PERFORMANCE_INFORMATION\n"); - fixme_written = TRUE; - } + + FIXME_ONCE("info_class SYSTEM_PERFORMANCE_INFORMATION\n"); + break; }
diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c index 384ac1d..4a46bda 100644 --- a/dlls/ntdll/unix/thread.c +++ b/dlls/ntdll/unix/thread.c @@ -1827,8 +1827,7 @@ BOOL get_thread_times(int unix_pid, int unix_tid, LARGE_INTEGER *kernel_time, LA procstat_close(pstat); return ret; #else - static int once; - if (!once++) FIXME("not implemented on this platform\n"); + FIXME_ONCE("not implemented on this platform\n"); return FALSE; #endif } diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c index 6db08de..31afda5 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -4911,12 +4911,10 @@ NTSTATUS WINAPI NtFlushInstructionCache( HANDLE handle, const void *addr, SIZE_T } else { - static int once; - if (!once++) FIXME( "%p %p %ld other process not supported\n", handle, addr, size ); + FIXME_ONCE( "%p %p %ld other process not supported\n", handle, addr, size ); } #else - static int once; - if (!once++) FIXME( "%p %p %ld\n", handle, addr, size ); + FIXME_ONCE( "%p %p %ld\n", handle, addr, size ); #endif return STATUS_SUCCESS; } @@ -4927,8 +4925,7 @@ NTSTATUS WINAPI NtFlushInstructionCache( HANDLE handle, const void *addr, SIZE_T */ void WINAPI NtFlushProcessWriteBuffers(void) { - static int once = 0; - if (!once++) FIXME( "stub\n" ); + FIXME_ONCE( "stub\n" ); }
introduce FIXME_ONCE
Signed-off-by: David Kahurani k.kahurani@gmail.com --- dlls/gdiplus/graphics.c | 26 +++++++------------------- dlls/gdiplus/graphicspath.c | 4 +--- dlls/gdiplus/metafile.c | 9 ++------- 3 files changed, 10 insertions(+), 29 deletions(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 4a428c4..35e54fa 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -1015,13 +1015,10 @@ static ARGB resample_bitmap_pixel(GDIPCONST GpRect *src_rect, LPBYTE bits, UINT UINT height, GpPointF *point, GDIPCONST GpImageAttributes *attributes, InterpolationMode interpolation, PixelOffsetMode offset_mode) { - static int fixme; - switch (interpolation) { default: - if (!fixme++) - FIXME("Unimplemented interpolation %i\n", interpolation); + FIXME_ONCE("Unimplemented interpolation %i\n", interpolation); /* fall-through */ case InterpolationModeBilinear: { @@ -1409,30 +1406,22 @@ static GpStatus brush_fill_pixels(GpGraphics *graphics, GpBrush *brush,
if (fill->focus.X != 0.0 || fill->focus.Y != 0.0) { - static int once; - if (!once++) - FIXME("path gradient focus not implemented\n"); + FIXME_ONCE("path gradient focus not implemented\n"); }
if (fill->gamma) { - static int once; - if (!once++) - FIXME("path gradient gamma correction not implemented\n"); + FIXME_ONCE("path gradient gamma correction not implemented\n"); }
if (fill->blendcount) { - static int once; - if (!once++) - FIXME("path gradient blend not implemented\n"); + FIXME_ONCE("path gradient blend not implemented\n"); }
if (fill->pblendcount) { - static int once; - if (!once++) - FIXME("path gradient preset blend not implemented\n"); + FIXME_ONCE("path gradient preset blend not implemented\n"); }
if (!transform_fixme_once) @@ -4869,10 +4858,9 @@ GpStatus WINGDIPAPI GdipGetNearestColor(GpGraphics *graphics, ARGB* argb)
if (graphics->image && graphics->image->type == ImageTypeBitmap) { - static int once; GpBitmap *bitmap = (GpBitmap *)graphics->image; - if (IsIndexedPixelFormat(bitmap->format) && !once++) - FIXME("(%p, %p): Passing color unmodified\n", graphics, argb); + if (IsIndexedPixelFormat(bitmap->format)) + FIXME_ONCE("(%p, %p): Passing color unmodified\n", graphics, argb); }
return Ok; diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index ce2666e..09c3a96 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -1860,9 +1860,7 @@ static void widen_joint(const GpPointF *p1, const GpPointF *p2, const GpPointF * } else if (pen->join == LineJoinMiter) { - static int once; - if (!once++) - FIXME("should add a clipped corner\n"); + FIXME_ONCE("should add a clipped corner\n"); } /* else fall-through */ } diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c index d79c939..eecd199 100644 --- a/dlls/gdiplus/metafile.c +++ b/dlls/gdiplus/metafile.c @@ -5050,8 +5050,6 @@ GpStatus METAFILE_DrawDriverString(GpMetafile *metafile, GDIPCONST UINT16 *text,
if (flags & DriverStringOptionsRealizedAdvance) { - static BOOL fixme_written = FALSE; - /* Native never writes DriverStringOptionsRealizedAdvance. Instead, in the case of RealizedAdvance, each glyph position is computed and serialized. @@ -5061,11 +5059,8 @@ GpStatus METAFILE_DrawDriverString(GpMetafile *metafile, GDIPCONST UINT16 *text, metafiles produced from GDI+ not setting this flag. Ideally we would also compute the position of each glyph here, serialize those values, and not set DriverStringOptionsRealizedAdvance. */ - if (!fixme_written) - { - fixme_written = TRUE; - FIXME("serializing RealizedAdvance flag and single GlyphPos with padding\n"); - } + + FIXME_ONCE("serializing RealizedAdvance flag and single GlyphPos with padding\n");
*((PointF*)cursor) = *positions; }
introduce FIXME_ONCE
Signed-off-by: David Kahurani k.kahurani@gmail.com --- dlls/kernel32/console.c | 4 +--- dlls/kernel32/process.c | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c index 4810feb..30a2d8b 100644 --- a/dlls/kernel32/console.c +++ b/dlls/kernel32/console.c @@ -165,9 +165,7 @@ BOOL WINAPI GetConsoleKeyboardLayoutNameA(LPSTR layoutName) */ BOOL WINAPI GetConsoleKeyboardLayoutNameW(LPWSTR layoutName) { - static int once; - if (!once++) - FIXME( "stub %p\n", layoutName); + FIXME_ONCE( "stub %p\n", layoutName); return TRUE; }
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index 01f4521..2ffbbad 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -543,8 +543,7 @@ HRESULT WINAPI RegisterApplicationRestart(PCWSTR pwzCommandLine, DWORD dwFlags) */ DWORD WINAPI WTSGetActiveConsoleSessionId(void) { - static int once; - if (!once++) FIXME("stub\n"); + FIXME_ONCE("stub\n"); /* Return current session id. */ return NtCurrentTeb()->Peb->SessionId; }
introduce FIXME_ONCE
Signed-off-by: David Kahurani k.kahurani@gmail.com --- dlls/msvcrt/concurrency.c | 3 +-- dlls/msvcrt/cpp.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/msvcrt/concurrency.c b/dlls/msvcrt/concurrency.c index 932ed52..95cd0cc 100644 --- a/dlls/msvcrt/concurrency.c +++ b/dlls/msvcrt/concurrency.c @@ -2708,9 +2708,8 @@ bool __thiscall _ReentrantBlockingLock__TryAcquire(_ReentrantBlockingLock *this) /* ?wait@Concurrency@@YAXI@Z */ void __cdecl Concurrency_wait(unsigned int time) { - static int once;
- if (!once++) FIXME("(%d) stub!\n", time); + FIXME_ONCE("(%d) stub!\n", time);
Sleep(time); } diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c index 6617237..66bfc9b 100644 --- a/dlls/msvcrt/cpp.c +++ b/dlls/msvcrt/cpp.c @@ -1122,8 +1122,7 @@ void CDECL __clean_type_info_names_internal(void *p) DEFINE_THISCALL_WRAPPER(type_info_name_internal_method,8) const char * __thiscall type_info_name_internal_method(type_info * _this, struct __type_info_node *node) { - static int once; - if (node && !once++) FIXME("type_info_node parameter ignored\n"); + if (node) FIXME_ONCE("type_info_node parameter ignored\n");
return type_info_name(_this); }
introduce FIXME_ONCE
Signed-off-by: David Kahurani k.kahurani@gmail.com --- dlls/dwrite/analyzer.c | 5 +---- dlls/dwrite/font.c | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c index 89c76da..1516d46 100644 --- a/dlls/dwrite/analyzer.c +++ b/dlls/dwrite/analyzer.c @@ -973,10 +973,7 @@ done: static HRESULT WINAPI dwritetextanalyzer_AnalyzeNumberSubstitution(IDWriteTextAnalyzer2 *iface, IDWriteTextAnalysisSource* source, UINT32 position, UINT32 length, IDWriteTextAnalysisSink* sink) { - static int once; - - if (!once++) - FIXME("(%p %u %u %p): stub\n", source, position, length, sink); + FIXME_ONCE("(%p %u %u %p): stub\n", source, position, length, sink); return S_OK; }
diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index b707131..7a52265 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -1642,10 +1642,7 @@ static HRESULT WINAPI dwritefontface5_GetFontAxisValues(IDWriteFontFace5 *iface,
static BOOL WINAPI dwritefontface5_HasVariations(IDWriteFontFace5 *iface) { - static int once; - - if (!once++) - FIXME("%p: stub\n", iface); + FIXME_ONCE("%p: stub\n", iface);
return FALSE; }
introduce FIXME_ONCE
Signed-off-by: David Kahurani k.kahurani@gmail.com --- dlls/gdi32/uniscribe/opentype.c | 20 +++++--------------- dlls/gdi32/uniscribe/usp10.c | 6 ++---- 2 files changed, 7 insertions(+), 19 deletions(-)
diff --git a/dlls/gdi32/uniscribe/opentype.c b/dlls/gdi32/uniscribe/opentype.c index a7a81ac..72519c2 100644 --- a/dlls/gdi32/uniscribe/opentype.c +++ b/dlls/gdi32/uniscribe/opentype.c @@ -1257,9 +1257,7 @@ static INT GSUB_apply_ChainContextSubst(const OT_LookupList* lookup, const OT_Lo ccsf1 = (const GSUB_ChainContextSubstFormat1*)GSUB_get_subtable(look, j); if (GET_BE_WORD(ccsf1->SubstFormat) == 1) { - static int once; - if (!once++) - FIXME(" TODO: subtype 1 (Simple context glyph substitution)\n"); + FIXME_ONCE(" TODO: subtype 1 (Simple context glyph substitution)\n"); continue; } else if (GET_BE_WORD(ccsf1->SubstFormat) == 2) @@ -2155,9 +2153,7 @@ static unsigned int GPOS_apply_ContextPos(const ScriptCache *script_cache, const
if (GET_BE_WORD(cpf2->PosFormat) == 1) { - static int once; - if (!once++) - FIXME(" TODO: subtype 1\n"); + FIXME_ONCE(" TODO: subtype 1\n"); continue; } else if (GET_BE_WORD(cpf2->PosFormat) == 2) @@ -2247,9 +2243,7 @@ static unsigned int GPOS_apply_ContextPos(const ScriptCache *script_cache, const } else if (GET_BE_WORD(cpf2->PosFormat) == 3) { - static int once; - if (!once++) - FIXME(" TODO: subtype 3\n"); + FIXME_ONCE(" TODO: subtype 3\n"); continue; } else @@ -2277,16 +2271,12 @@ static unsigned int GPOS_apply_ChainContextPos(const ScriptCache *script_cache,
if (GET_BE_WORD(backtrack->PosFormat) == 1) { - static int once; - if (!once++) - FIXME(" TODO: subtype 1 (Simple Chaining Context Glyph Positioning)\n"); + FIXME_ONCE(" TODO: subtype 1 (Simple Chaining Context Glyph Positioning)\n"); continue; } else if (GET_BE_WORD(backtrack->PosFormat) == 2) { - static int once; - if (!once++) - FIXME(" TODO: subtype 2 (Class-based Chaining Context Glyph Positioning)\n"); + FIXME_ONCE(" TODO: subtype 2 (Class-based Chaining Context Glyph Positioning)\n"); continue; } else if (GET_BE_WORD(backtrack->PosFormat) == 3) diff --git a/dlls/gdi32/uniscribe/usp10.c b/dlls/gdi32/uniscribe/usp10.c index cceb9dc..8d82e93 100644 --- a/dlls/gdi32/uniscribe/usp10.c +++ b/dlls/gdi32/uniscribe/usp10.c @@ -3059,7 +3059,6 @@ HRESULT WINAPI ScriptShapeOpenType( HDC hdc, SCRIPT_CACHE *psc, unsigned int g; BOOL rtl; int cluster; - static int once = 0;
TRACE("(%p, %p, %p, %s, %s, %p, %p, %d, %s, %d, %d, %p, %p, %p, %p, %p )\n", hdc, psc, psa, @@ -3074,7 +3073,7 @@ HRESULT WINAPI ScriptShapeOpenType( HDC hdc, SCRIPT_CACHE *psc, if (cChars > cMaxGlyphs) return E_OUTOFMEMORY;
if (cRanges) - if(!once++) FIXME("Ranges not supported yet\n"); + FIXME_ONCE("Ranges not supported yet\n");
rtl = (psa && !psa->fLogicalOrder && psa->fRTL);
@@ -3320,7 +3319,6 @@ HRESULT WINAPI ScriptPlaceOpenType( HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS { HRESULT hr; int i; - static int once = 0;
TRACE("(%p, %p, %p, %s, %s, %p, %p, %d, %s, %p, %p, %d, %p, %p, %d, %p %p %p)\n", hdc, psc, psa, @@ -3334,7 +3332,7 @@ HRESULT WINAPI ScriptPlaceOpenType( HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS if (!pGoffset) return E_FAIL;
if (cRanges) - if (!once++) FIXME("Ranges not supported yet\n"); + FIXME_ONCE("Ranges not supported yet\n");
((ScriptCache *)*psc)->userScript = tagScript; ((ScriptCache *)*psc)->userLang = tagLangSys;
introduce FIXME_ONCE
Signed-off-by: David Kahurani k.kahurani@gmail.com --- dlls/advapi32/eventlog.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/advapi32/eventlog.c b/dlls/advapi32/eventlog.c index 22e5a3f..e5352db 100644 --- a/dlls/advapi32/eventlog.c +++ b/dlls/advapi32/eventlog.c @@ -696,9 +696,8 @@ ULONG WINAPI QueryTraceW( TRACEHANDLE handle, LPCWSTR sessionname, PEVENT_TRACE_ */ TRACEHANDLE WINAPI OpenTraceA( PEVENT_TRACE_LOGFILEA logfile ) { - static int once;
- if (!once++) FIXME("%p: stub\n", logfile); + FIXME_ONCE("%p: stub\n", logfile); SetLastError(ERROR_ACCESS_DENIED); return INVALID_PROCESSTRACE_HANDLE; }
introduce FIXME_ONCE
Signed-off-by: David Kahurani k.kahurani@gmail.com --- dlls/dxgi/adapter.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/dlls/dxgi/adapter.c b/dlls/dxgi/adapter.c index 72f1a2d..f3be6a7 100644 --- a/dlls/dxgi/adapter.c +++ b/dlls/dxgi/adapter.c @@ -296,14 +296,12 @@ static HRESULT STDMETHODCALLTYPE dxgi_adapter_QueryVideoMemoryInfo(IWineDXGIAdap { struct dxgi_adapter *adapter = impl_from_IWineDXGIAdapter(iface); struct wined3d_adapter_identifier adapter_id; - static unsigned int once; HRESULT hr;
TRACE("iface %p, node_index %u, segment_group %#x, info %p.\n", iface, node_index, segment_group, info);
- if (!once++) - FIXME("Returning fake video memory info.\n"); + FIXME_ONCE("Returning fake video memory info.\n");
if (node_index) FIXME("Ignoring node index %u.\n", node_index);
introduce FIXME_ONCE
Signed-off-by: David Kahurani k.kahurani@gmail.com --- dlls/iphlpapi/iphlpapi_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c index d9a85be..6b8eb92 100644 --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -4418,10 +4418,8 @@ DWORD WINAPI GetBestRoute2(NET_LUID *luid, NET_IFINDEX index, ULONG options, PMIB_IPFORWARD_ROW2 bestroute, SOCKADDR_INET *bestaddress) { - static int once;
- if (!once++) - FIXME("(%p, %d, %p, %p, 0x%08x, %p, %p): stub\n", luid, index, source, + FIXME_ONCE("(%p, %d, %p, %p, 0x%08x, %p, %p): stub\n", luid, index, source, destination, options, bestroute, bestaddress);
if (!destination || !bestroute || !bestaddress)
introduce FIXME_ONCE
Signed-off-by: David Kahurani k.kahurani@gmail.com --- dlls/jscript/global.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/dlls/jscript/global.c b/dlls/jscript/global.c index 2665bec..3a75251 100644 --- a/dlls/jscript/global.c +++ b/dlls/jscript/global.c @@ -549,9 +549,7 @@ static HRESULT JSGlobal_ScriptEngineBuildVersion(script_ctx_t *ctx, vdisp_t *jst static HRESULT JSGlobal_CollectGarbage(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r) { - static int once = 0; - if (!once++) - FIXME(": stub\n"); + FIXME_ONCE(": stub\n"); return S_OK; }
introduce FIXME_ONCE
Signed-off-by: David Kahurani k.kahurani@gmail.com --- dlls/msctf/inputprocessor.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/dlls/msctf/inputprocessor.c b/dlls/msctf/inputprocessor.c index ac7fad6..2826336 100644 --- a/dlls/msctf/inputprocessor.c +++ b/dlls/msctf/inputprocessor.c @@ -866,13 +866,8 @@ static HRESULT WINAPI InputProcessorProfileMgr_UnregisterProfile(ITfInputProcess static HRESULT WINAPI InputProcessorProfileMgr_GetActiveProfile(ITfInputProcessorProfileMgr *iface, REFGUID catid, TF_INPUTPROCESSORPROFILE *pProfile) { - static int once; - - if (!once++) - { - InputProcessorProfiles *This = impl_from_ITfInputProcessorProfileMgr(iface); - FIXME("(%p)->(%s %p)\n", This, debugstr_guid(catid), pProfile); - } + InputProcessorProfiles *This = impl_from_ITfInputProcessorProfileMgr(iface); + FIXME_ONCE("(%p)->(%s %p)\n", This, debugstr_guid(catid), pProfile);
return E_NOTIMPL; }
introduce FIXME_ONCE
Signed-off-by: David Kahurani k.kahurani@gmail.com --- dlls/ntoskrnl.exe/ntoskrnl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index ec297e7..d6c7a3a 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -4060,8 +4060,7 @@ NTSTATUS WINAPI FsRtlRegisterFileSystemFilterCallbacks( DRIVER_OBJECT *object, P */ BOOLEAN WINAPI SeSinglePrivilegeCheck(LUID privilege, KPROCESSOR_MODE mode) { - static int once; - if (!once++) FIXME("stub: %08x%08x %u\n", privilege.HighPart, privilege.LowPart, mode); + FIXME_ONCE("stub: %08x%08x %u\n", privilege.HighPart, privilege.LowPart, mode); return TRUE; }
introduce FIXME_ONCE
Signed-off-by: David Kahurani k.kahurani@gmail.com --- dlls/rpcrt4/ndr_marshall.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 764b304..fa5b5e6 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -7260,10 +7260,7 @@ NDR_SCONTEXT WINAPI NdrServerContextNewUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, */ void WINAPI NdrCorrelationInitialize(PMIDL_STUB_MESSAGE pStubMsg, void *pMemory, ULONG CacheSize, ULONG Flags) { - static int once; - - if (!once++) - FIXME("(%p, %p, %d, 0x%x): semi-stub\n", pStubMsg, pMemory, CacheSize, Flags); + FIXME_ONCE("(%p, %p, %d, 0x%x): semi-stub\n", pStubMsg, pMemory, CacheSize, Flags);
if (pStubMsg->CorrDespIncrement == 0) pStubMsg->CorrDespIncrement = 2; /* size of the normal (non-range) /robust payload */ @@ -7301,8 +7298,5 @@ void WINAPI NdrCorrelationPass(PMIDL_STUB_MESSAGE pStubMsg) */ void WINAPI NdrCorrelationFree(PMIDL_STUB_MESSAGE pStubMsg) { - static int once; - - if (!once++) - FIXME("(%p): stub\n", pStubMsg); + FIXME_ONCE("(%p): stub\n", pStubMsg); }
introduce FIXME_ONCE
Signed-off-by: David Kahurani k.kahurani@gmail.com --- dlls/sechost/trace.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/sechost/trace.c b/dlls/sechost/trace.c index 0173369..4423640 100644 --- a/dlls/sechost/trace.c +++ b/dlls/sechost/trace.c @@ -120,9 +120,8 @@ ULONG WINAPI StopTraceW( TRACEHANDLE handle, const WCHAR *session, EVENT_TRACE_P */ TRACEHANDLE WINAPI OpenTraceW( EVENT_TRACE_LOGFILEW *logfile ) { - static int once;
- if (!once++) FIXME("%p: stub\n", logfile); + FIXME_ONCE("%p: stub\n", logfile); SetLastError(ERROR_ACCESS_DENIED); return INVALID_PROCESSTRACE_HANDLE; }
introduce FIXME_ONCE
Signed-off-by: David Kahurani k.kahurani@gmail.com --- dlls/wbemprox/class.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/wbemprox/class.c b/dlls/wbemprox/class.c index cabf1c9..20e9e68 100644 --- a/dlls/wbemprox/class.c +++ b/dlls/wbemprox/class.c @@ -115,14 +115,13 @@ static HRESULT WINAPI enum_class_object_Next( struct enum_class_object *ec = impl_from_IEnumWbemClassObject( iface ); struct view *view = ec->query->view; struct table *table; - static int once = 0; HRESULT hr; ULONG i, j;
TRACE("%p, %d, %u, %p, %p\n", iface, lTimeout, uCount, apObjects, puReturned);
if (!apObjects || !puReturned) return WBEM_E_INVALID_PARAMETER; - if (lTimeout != WBEM_INFINITE && !once++) FIXME("timeout not supported\n"); + if (lTimeout != WBEM_INFINITE) FIXME_ONCE("timeout not supported\n");
*puReturned = 0;
@@ -170,11 +169,10 @@ static HRESULT WINAPI enum_class_object_Skip( { struct enum_class_object *ec = impl_from_IEnumWbemClassObject( iface ); struct view *view = ec->query->view; - static int once = 0;
TRACE("%p, %d, %u\n", iface, lTimeout, nCount);
- if (lTimeout != WBEM_INFINITE && !once++) FIXME("timeout not supported\n"); + if (lTimeout != WBEM_INFINITE) FIXME_ONCE("timeout not supported\n");
if (!view->result_count) return WBEM_S_FALSE;
introduce FIXME_ONCE
Signed-off-by: David Kahurani k.kahurani@gmail.com --- dlls/winecoreaudio.drv/audiounit.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/winecoreaudio.drv/audiounit.c b/dlls/winecoreaudio.drv/audiounit.c index 030ff4d..abed596 100644 --- a/dlls/winecoreaudio.drv/audiounit.c +++ b/dlls/winecoreaudio.drv/audiounit.c @@ -53,9 +53,8 @@ WINE_DECLARE_DEBUG_CHANNEL(midi); int AudioUnit_SetVolume(AudioUnit au, float left, float right) { OSStatus err = noErr; - static int once;
- if (!once++) FIXME("independent left/right volume not implemented (%f, %f)\n", left, right); + FIXME_ONCE("independent left/right volume not implemented (%f, %f)\n", left, right);
err = AudioUnitSetParameter(au, kHALOutputParam_Volume, kAudioUnitParameterFlag_Output, 0, left, 0);
@@ -70,9 +69,8 @@ int AudioUnit_SetVolume(AudioUnit au, float left, float right) int AudioUnit_GetVolume(AudioUnit au, float *left, float *right) { OSStatus err = noErr; - static int once;
- if (!once++) FIXME("independent left/right volume not implemented\n"); + FIXME_ONCE("independent left/right volume not implemented\n");
err = AudioUnitGetParameter(au, kHALOutputParam_Volume, kAudioUnitParameterFlag_Output, 0, left); if (err != noErr)
introduce FIXME_ONCE
Signed-off-by: David Kahurani k.kahurani@gmail.com --- dlls/wined3d/state.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index c7f0410..637d3ca 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -2170,11 +2170,9 @@ static void state_ckeyblend(struct wined3d_context *context, const struct wined3
static void state_swvp(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { - static int once; if (state->render_states[WINED3D_RS_SOFTWAREVERTEXPROCESSING]) { - if (!once++) - FIXME("Software vertex processing not implemented.\n"); + FIXME_ONCE("Software vertex processing not implemented.\n"); } }
introduce FIXME_ONCE
Signed-off-by: David Kahurani k.kahurani@gmail.com --- dlls/wtsapi32/wtsapi32.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/wtsapi32/wtsapi32.c b/dlls/wtsapi32/wtsapi32.c index d766223..28f2722 100644 --- a/dlls/wtsapi32/wtsapi32.c +++ b/dlls/wtsapi32/wtsapi32.c @@ -293,9 +293,8 @@ BOOL WINAPI WTSEnumerateSessionsExA(HANDLE server, DWORD *level, DWORD filter, W BOOL WINAPI WTSEnumerateSessionsA(HANDLE hServer, DWORD Reserved, DWORD Version, PWTS_SESSION_INFOA* ppSessionInfo, DWORD* pCount) { - static int once;
- if (!once++) FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer, Reserved, Version, + FIXME_ONCE("Stub %p 0x%08x 0x%08x %p %p\n", hServer, Reserved, Version, ppSessionInfo, pCount);
if (!ppSessionInfo || !pCount) return FALSE;
introduce FIXME_ONCE
Signed-off-by: David Kahurani k.kahurani@gmail.com --- dlls/xinput1_3/main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/dlls/xinput1_3/main.c b/dlls/xinput1_3/main.c index 506802d..d8614b0 100644 --- a/dlls/xinput1_3/main.c +++ b/dlls/xinput1_3/main.c @@ -1103,9 +1103,7 @@ DWORD WINAPI DECLSPEC_HOTPATCH XInputGetDSoundAudioDeviceGuids(DWORD index, GUID
DWORD WINAPI DECLSPEC_HOTPATCH XInputGetBatteryInformation(DWORD index, BYTE type, XINPUT_BATTERY_INFORMATION* battery) { - static int once; - - if (!once++) FIXME("(index %u, type %u, battery %p) Stub!\n", index, type, battery); + FIXME_ONCE("(index %u, type %u, battery %p) Stub!\n", index, type, battery);
if (index >= XUSER_MAX_COUNT) return ERROR_BAD_ARGUMENTS; if (!controllers[index].device) return ERROR_DEVICE_NOT_CONNECTED;
On 10/18/21 2:57 PM, David Kahurani wrote:
The following patches introduce the FIXME_ONCE macro which suppresses repeated FIXMEs into WARNings. The current FIXME macro tends to be insufficient in cases where a developer wishes to suppresses fixmes other than the first. It is based on the vkd3d version.
v2: Fix programming mistakes, fixed a test and some formating
David Kahurani (21):
Hi David,
I understand this can look better at first but there's additional things to take into consideration, and especially what a change like this implies.
First of all, this is changing a header used in absolutely all Wine source code. This means that such change will require other developers to fully rebuild Wine, and things like ccache won't help at all.
This better has to be really well justified, and maybe subject to prior discussion and general agreement unless there's no doubt it's needed (like adding Windows declarations in public header files).
I don't think this is the case here: the change introduces a new macro that will only save one line of code everywhere it's used.
Second, every patch sent on this mailing list is going to be built and eventually tested by an automated test bot. Like for the first point, as this series is modifying a global header used everywhere else, the bot is going to have to rebuild everything from scratch.
This will take a certain amount of time and resources... but moreover, it's going to have to do it for every single patch of the series, and that is going to take ages. As you may have noticed, your previous attempt took around 18h to build and test all the patches, and during that period of time the test bot is going to be fairly unavailable for any other developer or patch (there's some priorities involved but still).
In conclusion, I think I can say this is very unlikely to be accepted, because of the limited usefulness I described in the first part, but even if it was you should probably start sending much much smaller batches if you change global headers.
Cheers,
On Mon, Oct 18, 2021 at 4:18 PM Rémi Bernon rbernon@codeweavers.com wrote:
On 10/18/21 2:57 PM, David Kahurani wrote:
The following patches introduce the FIXME_ONCE macro which suppresses repeated FIXMEs into WARNings. The current FIXME macro tends to be insufficient in cases where a developer wishes to suppresses fixmes other than the first. It is based on the vkd3d version.
v2: Fix programming mistakes, fixed a test and some formating
David Kahurani (21):
Hi David,
I understand this can look better at first but there's additional things to take into consideration, and especially what a change like this implies.
First of all, this is changing a header used in absolutely all Wine source code. This means that such change will require other developers to fully rebuild Wine, and things like ccache won't help at all.
This better has to be really well justified, and maybe subject to prior discussion and general agreement unless there's no doubt it's needed (like adding Windows declarations in public header files).
I don't think this is the case here: the change introduces a new macro that will only save one line of code everywhere it's used.
Second, every patch sent on this mailing list is going to be built and eventually tested by an automated test bot. Like for the first point, as this series is modifying a global header used everywhere else, the bot is going to have to rebuild everything from scratch.
This will take a certain amount of time and resources... but moreover, it's going to have to do it for every single patch of the series, and that is going to take ages. As you may have noticed, your previous attempt took around 18h to build and test all the patches, and during that period of time the test bot is going to be fairly unavailable for any other developer or patch (there's some priorities involved but still).
In conclusion, I think I can say this is very unlikely to be accepted, because of the limited usefulness I described in the first part, but even if it was you should probably start sending much much smaller batches if you change global headers.
I have considered all that you described. This change was suggested here on the list a while back and I took it up. The problem with the patchset is that they go into different subsystems which forces me to split them up. They can obviously be bundled into one single patch or maybe just one patch demonstrating the use.
Cheers,
Rémi Bernon rbernon@codeweavers.com
On 10/18/21 3:36 PM, David Kahurani wrote:
On Mon, Oct 18, 2021 at 4:18 PM Rémi Bernon rbernon@codeweavers.com wrote:
On 10/18/21 2:57 PM, David Kahurani wrote:
The following patches introduce the FIXME_ONCE macro which suppresses repeated FIXMEs into WARNings. The current FIXME macro tends to be insufficient in cases where a developer wishes to suppresses fixmes other than the first. It is based on the vkd3d version.
v2: Fix programming mistakes, fixed a test and some formating
David Kahurani (21):
Hi David,
I understand this can look better at first but there's additional things to take into consideration, and especially what a change like this implies.
First of all, this is changing a header used in absolutely all Wine source code. This means that such change will require other developers to fully rebuild Wine, and things like ccache won't help at all.
This better has to be really well justified, and maybe subject to prior discussion and general agreement unless there's no doubt it's needed (like adding Windows declarations in public header files).
I don't think this is the case here: the change introduces a new macro that will only save one line of code everywhere it's used.
Second, every patch sent on this mailing list is going to be built and eventually tested by an automated test bot. Like for the first point, as this series is modifying a global header used everywhere else, the bot is going to have to rebuild everything from scratch.
This will take a certain amount of time and resources... but moreover, it's going to have to do it for every single patch of the series, and that is going to take ages. As you may have noticed, your previous attempt took around 18h to build and test all the patches, and during that period of time the test bot is going to be fairly unavailable for any other developer or patch (there's some priorities involved but still).
In conclusion, I think I can say this is very unlikely to be accepted, because of the limited usefulness I described in the first part, but even if it was you should probably start sending much much smaller batches if you change global headers.
I have considered all that you described. This change was suggested here on the list a while back and I took it up. The problem with the patchset is that they go into different subsystems which forces me to split them up. They can obviously be bundled into one single patch or maybe just one patch demonstrating the use.
Yes, a patch or two introduce the new macro and to demonstrate how it can be helpful is usually much better, and then see if it gets accepted and you could send the rest.