mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 01:34:11 +00:00
test: fix tautological constant out of range warning
> ../test/misc.c:172:5: warning: result of comparison of constant 4611686018427387903 with expression of type 'CARD32' (aka 'unsigned int') is always true [-Wtautological-constant-out-of-range-compare] > 172 | REQUEST_FIXED_SIZE(req, SIZE_MAX); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ../include/dix.h:88:25: note: expanded from macro 'REQUEST_FIXED_SIZE' > 88 | (((n) >> 2) >= client->req_len) || \ > | ~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~ We don't really need SIZE_MAX (platform specific) for this job, just a big enough number. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
01768051cf
commit
21fbe9394b
@@ -169,7 +169,7 @@ dix_request_fixed_size_overflow(ClientRec *client)
|
||||
xReq req = { 0 };
|
||||
|
||||
client->req_len = req.length = 1;
|
||||
REQUEST_FIXED_SIZE(req, SIZE_MAX);
|
||||
REQUEST_FIXED_SIZE(req, 4096);
|
||||
return Success;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user