You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix range of unsigned types
* printf format fix warnings
$ gcc --std=c89 1.ranges-of-variables.c
1.ranges-of-variables.c: In function ‘main’:
1.ranges-of-variables.c:13:28: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
13 | printf("LONG_MIN: %d\n", LONG_MIN);
| ~^
| |
| int
| %ld
1.ranges-of-variables.c:32:34: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
32 | printf("signed long min=%d\n",-(long)((unsigned long) ~0 >> 1));
| ~^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| int long int
| %ld
0 commit comments