util-linux 2.10p compiler warnings

Andries.Brouwer@cwi.nl Andries.Brouwer@cwi.nl
Fri Oct 20 17:47:00 GMT 2000


According to the standards available to me, the field
sem_nsems of a struct semid_ds has type unsigned short.

However, I am told that with glibc 2.1.95 compilation
of the program

#include <stdio.h>
#include <sys/types.h>
#include <sys/sem.h>

int main() {
        struct semid_ds s;
        printf("%d\n", s.sem_nsems);
        return 0;
}

yields the error message
t.c:7: warning: int format, long int arg (arg 2)

I think this might be a bug in glibc 2.1.95.

Andries


More information about the Libc-alpha mailing list