[PATCH 1/4] include/wine: Introduce a FIXME_ONCE macro.

Zebediah Figura zfigura at codeweavers.com
Mon Mar 7 13:21:21 CST 2022


On 3/7/22 13:03, Rémi Bernon wrote:
> On 3/7/22 18:49, Zebediah Figura wrote:
>> On 3/7/22 11:28, Alexandre Julliard wrote:
>>> Zebediah Figura <zfigura at codeweavers.com> writes:
>>>
>>>> On 3/5/22 02:40, Alexandre Julliard wrote:
>>>>> Zebediah Figura <zfigura at codeweavers.com> writes:
>>>>>
>>>>>> +#define __WINE_DPRINTF_ONCE(dbcl1,dbcl2,dbch) \
>>>>>> +  do { \
>>>>>> +    static BOOL __wine_next_time_level;\
>>>>>> +    const enum __wine_debug_class __dbcl = \
>>>>>> +    __wine_next_time_level ? __WINE_DBCL##dbcl2 : 
>>>>>> __WINE_DBCL##dbcl1;\
>>>>>> +    (!__WINE_GET_DEBUGGING(dbcl1,(dbch)) || \
>>>>>> +     (wine_dbg_log(__dbcl,(dbch),__FILE__,"%d: ",__LINE__) == 
>>>>>> -1)) ? \
>>>>>> +     (void)0 : (void)wine_dbg_printf \
>>>>>> +     __wine_next_time_level = TRUE; } while (0)
>>>>> As already mentioned, this cannot possibly work.
>>>>>
>>>>
>>>> Sorry, that was a copy-paste error. I'm not sure where it was already
>>>> mentioned, though?
>>>
>>> When the patch was originally submitted. It looks like it hasn't changed
>>> since then.
>>>
>>
>> Sorry, I managed to look for replies twice and still didn't see it.
>>
>> I'll send a new version with that hunk removed.
>>
> 
> I'm not sure to see how falling back to WARN after the first FIXME is 
> really useful.
> 
> Often I've found warn+all useful to find some potential issues, and imho 
> this will simply make it way more verbose as soon as one of these 
> frequently called functions are involved, and thus less useful.
> 
> As there's already a fixme message being printed once, I think the 
> message has served its purpose, especially as it's supposed to really 
> print something *once*.
> 

Well, it's what vkd3d does, at least. I guess the actual intent of WARN 
has been less than perfectly clear to me. On the other hand, I don't 
personally care either way, so in the presence of someone who does, I'm 
happy to alter this to use TRACE instead.



More information about the wine-devel mailing list