]> granicus.if.org Git - procps-ng/commit
testsuite: shmget returns an int
authorCraig Small <csmall@dropbear.xyz>
Tue, 3 May 2022 09:41:00 +0000 (19:41 +1000)
committerCraig Small <csmall@dropbear.xyz>
Tue, 3 May 2022 09:41:00 +0000 (19:41 +1000)
commit412f3e8aa4b8bb9ef87617b7bd21766319e693c8
tree57a01f4a11907498bc1f1b1e7f4c56f06a772144
parent38693960a1aeaede5b789055bcac991c8c214610
testsuite: shmget returns an int

Stops the compilier (correctly) complaining:

lib/test_shm.c: In function ‘main’:
lib/test_shm.c:65:23: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘int’ [-Wformat=]
   65 |     printf("SHMID: %llx\n", shm_id);
      |                    ~~~^     ~~~~~~
      |                       |     |
      |                       |     int
      |                       long long unsigned int

shm_id is an int which is what shmget() returns.

Strangely pmap has always scanned this in as a llx even though the maps
"inode" column is the same number that shmget() returns.

Signed-off-by: Craig Small <csmall@dropbear.xyz>
lib/test_shm.c