mirror of
https://github.com/openbsd/src.git
synced 2025-01-10 06:47:55 -08:00
Make that test pass on 64 bit platforms as well.
This commit is contained in:
parent
42bdce3541
commit
90140cc775
@ -1,8 +1,14 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(__LP64__)
|
||||
#define DUMMYSIZE 104
|
||||
#else
|
||||
#define DUMMYSIZE 100
|
||||
#endif
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
char *buf;
|
||||
char buf2[10];
|
||||
snprintf(buf2, -sizeof(buf) + 100, "%s", "foo");
|
||||
snprintf(buf2, -sizeof(buf) + DUMMYSIZE, "%s", "foo");
|
||||
return 1;
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
snprintf-4.cpp: In function `int main(int, char **)':
|
||||
snprintf-4.cpp:6: warning: sizeof(pointer) possibly incorrect in argument 2
|
||||
snprintf-4.cpp:6: warning: array size (10) smaller than bound length (96)
|
||||
snprintf-4.cpp:12: warning: sizeof(pointer) possibly incorrect in argument 2
|
||||
snprintf-4.cpp:12: warning: array size (10) smaller than bound length (96)
|
||||
|
@ -1,5 +1,5 @@
|
||||
snprintf-4.cpp: In function `int main(int, char**)':
|
||||
snprintf-4.cpp:6: warning: sizeof(pointer) possibly incorrect in argument 2
|
||||
snprintf-4.cpp:6: warning: array size (10) smaller than bound length (96)
|
||||
snprintf-4.cpp:6: warning: sizeof(pointer) possibly incorrect in argument 2
|
||||
snprintf-4.cpp:6: warning: array size (10) smaller than bound length (96)
|
||||
snprintf-4.cpp:12: warning: sizeof(pointer) possibly incorrect in argument 2
|
||||
snprintf-4.cpp:12: warning: array size (10) smaller than bound length (96)
|
||||
snprintf-4.cpp:12: warning: sizeof(pointer) possibly incorrect in argument 2
|
||||
snprintf-4.cpp:12: warning: array size (10) smaller than bound length (96)
|
||||
|
Loading…
Reference in New Issue
Block a user