• D
    Disable cast-align warnings in various places · e57aaa6f
    Daniel P. Berrange 提交于
    There are a number of places which generate cast alignment
    warnings, which are difficult or impossible to address. Use
    pragmas to disable the warnings in these few places
    
    conf/nwfilter_conf.c: In function 'virNWFilterRuleDetailsParse':
    conf/nwfilter_conf.c:1806:16: warning: cast increases required alignment of target type [-Wcast-align]
             item = (nwItemDesc *)((char *)nwf + att[idx].dataIdx);
    conf/nwfilter_conf.c: In function 'virNWFilterRuleDefDetailsFormat':
    conf/nwfilter_conf.c:3238:16: warning: cast increases required alignment of target type [-Wcast-align]
             item = (nwItemDesc *)((char *)def + att[i].dataIdx);
    
    storage/storage_backend_mpath.c: In function 'virStorageBackendCreateVols':
    storage/storage_backend_mpath.c:247:17: warning: cast increases required alignment of target type [-Wcast-align]
             names = (struct dm_names *)(((char *)names) + next);
    
    nwfilter/nwfilter_dhcpsnoop.c: In function 'virNWFilterSnoopDHCPDecode':
    nwfilter/nwfilter_dhcpsnoop.c:994:15: warning: cast increases required alignment of target type [-Wcast-align]
             pip = (struct iphdr *) pep->eh_data;
    nwfilter/nwfilter_dhcpsnoop.c:1004:11: warning: cast increases required alignment of target type [-Wcast-align]
         pup = (struct udphdr *) ((char *) pip + (pip->ihl << 2));
    
    nwfilter/nwfilter_learnipaddr.c: In function 'procDHCPOpts':
    nwfilter/nwfilter_learnipaddr.c:327:33: warning: cast increases required alignment of target type [-Wcast-align]
                     uint32_t *tmp = (uint32_t *)&dhcpopt->value;
    nwfilter/nwfilter_learnipaddr.c: In function 'learnIPAddressThread':
    nwfilter/nwfilter_learnipaddr.c:501:43: warning: cast increases required alignment of target type [-Wcast-align]
                         struct iphdr *iphdr = (struct iphdr*)(packet +
    nwfilter/nwfilter_learnipaddr.c:538:43: warning: cast increases required alignment of target type [-Wcast-align]
                         struct iphdr *iphdr = (struct iphdr*)(packet +
    nwfilter/nwfilter_learnipaddr.c:544:48: warning: cast increases required alignment of target type [-Wcast-align]
                             struct udphdr *udphdr= (struct udphdr *)
    Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
    e57aaa6f
nwfilter_dhcpsnoop.c 61.9 KB