server/token.c -- -Wtype-limits changes

Gerald Pfeifer gerald at pfeifer.com
Tue Jan 8 19:18:30 CST 2008


On Tue, 1 Jan 2008, Gerald Pfeifer wrote:
>> Indeed WINED3DTEXF_NONE is 0 and thus the comparison is a noop.  I see
>> three ways to handle this:
>>
>> 1. the straightforward patch below,
>> 2. adding an  #ifdef WINED3DTEXF_NONE > 0  around those two conditions, 
>> 3. living with the warning.
>> [...]
>> Thoughts?
> since I saw you go for option 1 in the case of basetexture.c, here is
> the analog patch for cubetexture.c. ;-)

And here is the final such instance I found.  With this patch, my local 
tree is completely -Wtype-limits now and I believe I have submitted all 
patches to that end now. :-)

Gerald

ChangeLog:
Remove a noop check.

Index: server/token.c
===================================================================
RCS file: /home/wine/wine/server/token.c,v
retrieving revision 1.60
diff -u -3 -p -r1.60 token.c
--- server/token.c	6 Dec 2007 14:27:53 -0000	1.60
+++ server/token.c	7 Jan 2008 13:57:28 -0000
@@ -515,8 +515,7 @@ struct token *token_duplicate( struct to
     struct privilege *privilege;
     struct group *group;
 
-    if ((impersonation_level < SecurityAnonymous) ||
-        (impersonation_level > SecurityDelegation))
+    if (impersonation_level > SecurityDelegation)
     {
         set_error( STATUS_BAD_IMPERSONATION_LEVEL );
         return NULL;



More information about the wine-patches mailing list