This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/18232] New: semid_ds struct's sem_nsems member is wrong in sys/sem.h


https://sourceware.org/bugzilla/show_bug.cgi?id=18232

            Bug ID: 18232
           Summary: semid_ds struct's sem_nsems member is wrong in
                    sys/sem.h
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: nszabolcs at gmail dot com
                CC: drepper.fsp at gmail dot com

sem_nsems must have type unsigned short

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_sem.h.html

the following code fails on linux:

#define _XOPEN_SOURCE 700
#include <sys/sem.h>
void f()
{
struct semid_ds x;
unsigned short *p = &x.sem_nsems; // warning: initialization from incompatible
pointer type [enabled by default]
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]