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/22489] New: gcc warns about implicit convertion in ICMP6_FILTER_SETPASS with -Wsign-conversion


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

            Bug ID: 22489
           Summary: gcc warns about implicit convertion in
                    ICMP6_FILTER_SETPASS with -Wsign-conversion
           Product: glibc
           Version: 2.26
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: s.korolev at ndmsystems dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

Created attachment 10633
  --> https://sourceware.org/bugzilla/attachment.cgi?id=10633&action=edit
A patch to fix

The simplest code (icmp6_test.c)

#include <stdlib.h>                                                           
#include <netinet/icmp6.h>                                                    

int main()                                                                    
{                                                                             
    struct icmp6_filter filter;                                               

    ICMP6_FILTER_SETPASS(ND_ROUTER_ADVERT, &filter);                          

    return EXIT_SUCCESS;                                                      
}

compiled with "gcc icmp6_test.c -Wsign-conversion" gives a warning

icmp6_test.c: In function ‘main’:
icmp6_test.c:8:2: warning: negative integer implicitly converted to unsigned
type [-Wsign-conversion]
  ICMP6_FILTER_SETPASS(ND_ROUTER_ADVERT, &filter);

-- 
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]