View Issue Details

IDProjectCategoryView StatusLast Update
0005816GNUnetDHT servicepublic2019-11-08 11:29
ReporterschanzenAssigned Toschanzen 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionreopened 
Product Version0.11.7 
Target Version0.11.7Fixed in Version0.11.7 
Summary0005816: macOS build warning
Descriptiondht_api.c:545:20: warning: taking address of packed member 'key' of class or
      structure 'GNUNET_DHT_MonitorGetMessage' may result in an unaligned pointer
      value [-Waddress-of-packed-member]
                  &msg->key);
                   ^~~~~~~~
dht_api.c:611:25: warning: taking address of packed member 'key' of class or
      structure 'GNUNET_DHT_MonitorGetRespMessage' may result in an unaligned pointer
      value [-Waddress-of-packed-member]
                       &msg->key,
                        ^~~~~~~~
dht_api.c:679:20: warning: taking address of packed member 'key' of class or
      structure 'GNUNET_DHT_MonitorPutMessage' may result in an unaligned pointer
      value [-Waddress-of-packed-member]
                  &msg->key,
                   ^~~~~~~~
dht_api.c:814:48: warning: taking address of packed member 'key' of class or
      structure 'GNUNET_DHT_ClientResultMessage' may result in an unaligned pointer
      value [-Waddress-of-packed-member]
                                              &msg->key,
TagsNo tags attached.

Activities

schanzen

2019-07-21 21:07

manager   ~0014719

More:

./gnunet-service-dht_clients.c:488:34: warning: taking address of packed member 'key'
      of class or structure 'GNUNET_DHT_ClientPutMessage' may result in an unaligned
      pointer value [-Waddress-of-packed-member]
               GNUNET_h2s_full (&dht_msg->key));
                                 ^~~~~~~~~~~~
./gnunet-service-dht_clients.c:41:68: note: expanded from macro 'LOG_TRAFFIC'
#define LOG_TRAFFIC(kind,...) GNUNET_log_from (kind, "dht-traffic",__VA_ARGS__)
                                                                   ^~~~~~~~~~~
../../src/include/gnunet_common.h:528:50: note: expanded from macro 'GNUNET_log_from'
          GNUNET_log_from_nocheck ((kind), comp, __VA_ARGS__); \
                                                 ^~~~~~~~~~~
In file included from gnunet-service-dht.c:58:
./gnunet-service-dht_clients.c:493:21: warning: taking address of packed member 'key'
      of class or structure 'GNUNET_DHT_ClientPutMessage' may result in an unaligned
      pointer value [-Waddress-of-packed-member]
       GNUNET_h2s (&dht_msg->key));
                    ^~~~~~~~~~~~
./gnunet-service-dht_clients.c:43:60: note: expanded from macro 'LOG'
#define LOG(kind,...) GNUNET_log_from (kind, "dht-clients",__VA_ARGS__)
                                                           ^~~~~~~~~~~
../../src/include/gnunet_common.h:528:50: note: expanded from macro 'GNUNET_log_from'
          GNUNET_log_from_nocheck ((kind), comp, __VA_ARGS__); \
                                                 ^~~~~~~~~~~
In file included from gnunet-service-dht.c:58:
./gnunet-service-dht_clients.c:495:30: warning: taking address of packed member 'key'
      of class or structure 'GNUNET_DHT_ClientPutMessage' may result in an unaligned
      pointer value [-Waddress-of-packed-member]
                            &dht_msg->key,
                             ^~~~~~~~~~~~
./gnunet-service-dht_clients.c:505:30: warning: taking address of packed member 'key'
      of class or structure 'GNUNET_DHT_ClientPutMessage' may result in an unaligned
      pointer value [-Waddress-of-packed-member]
                            &dht_msg->key,
                             ^~~~~~~~~~~~
./gnunet-service-dht_clients.c:522:31: warning: taking address of packed member 'key'
      of class or structure 'GNUNET_DHT_ClientPutMessage' may result in an unaligned
      pointer value [-Waddress-of-packed-member]
                             &dht_msg->key,
                              ^~~~~~~~~~~~
./gnunet-service-dht_clients.c:534:29: warning: taking address of packed member 'key'
      of class or structure 'GNUNET_DHT_ClientPutMessage' may result in an unaligned
      pointer value [-Waddress-of-packed-member]
                           &dht_msg->key,
                            ^~~~~~~~~~~~
./gnunet-service-dht_clients.c:620:21: warning: taking address of packed member 'key'
      of class or structure 'GNUNET_DHT_ClientGetMessage' may result in an unaligned
      pointer value [-Waddress-of-packed-member]
       GNUNET_h2s (&get->key),
                    ^~~~~~~~
./gnunet-service-dht_clients.c:43:60: note: expanded from macro 'LOG'
#define LOG(kind,...) GNUNET_log_from (kind, "dht-clients",__VA_ARGS__)
                                                           ^~~~~~~~~~~
../../src/include/gnunet_common.h:528:50: note: expanded from macro 'GNUNET_log_from'
          GNUNET_log_from_nocheck ((kind), comp, __VA_ARGS__); \
                                                 ^~~~~~~~~~~
In file included from gnunet-service-dht.c:58:
./gnunet-service-dht_clients.c:626:34: warning: taking address of packed member 'key'
      of class or structure 'GNUNET_DHT_ClientGetMessage' may result in an unaligned
      pointer value [-Waddress-of-packed-member]
               GNUNET_h2s_full (&get->key));
                                 ^~~~~~~~
./gnunet-service-dht_clients.c:41:68: note: expanded from macro 'LOG_TRAFFIC'
#define LOG_TRAFFIC(kind,...) GNUNET_log_from (kind, "dht-traffic",__VA_ARGS__)
                                                                   ^~~~~~~~~~~
../../src/include/gnunet_common.h:528:50: note: expanded from macro 'GNUNET_log_from'
          GNUNET_log_from_nocheck ((kind), comp, __VA_ARGS__); \
                                                 ^~~~~~~~~~~
In file included from gnunet-service-dht.c:58:
./gnunet-service-dht_clients.c:654:29: warning: taking address of packed member 'key'
      of class or structure 'GNUNET_DHT_ClientGetMessage' may result in an unaligned
      pointer value [-Waddress-of-packed-member]
                           &get->key);
                            ^~~~~~~~
./gnunet-service-dht_clients.c:661:30: warning: taking address of packed member 'key'
      of class or structure 'GNUNET_DHT_ClientGetMessage' may result in an unaligned
      pointer value [-Waddress-of-packed-member]
  GDS_DATACACHE_handle_get (&get->key,
                             ^~~~~~~~
./gnunet-service-dht_clients.c:760:13: warning: taking address of packed member 'key'
      of class or structure 'GNUNET_DHT_ClientGetResultSeenMessage' may result in an
      unaligned pointer value [-Waddress-of-packed-member]
                                              &seen->key,

schanzen

2019-07-23 12:59

manager   ~0014720

Fixed in b92650ab1..dbf604ad9

schanzen

2019-07-23 13:00

manager   ~0014721

Wrong bug closed

schanzen

2019-07-23 13:00

manager   ~0014722

Reopened

Christian Grothoff

2019-07-29 17:56

manager   ~0014756

Manual inspection of some of these suggests the compiler is simply out-of-line / way too often wrong about this one.

schanzen

2019-07-31 13:57

manager   ~0014762

How to proceed? -Wno-address-of-packed-member or change the code or do nothing?

Christian Grothoff

2019-07-31 19:49

manager   ~0014763

Passing -W options should always be fine, they just toggle warnings and don't change the generated binaries. So sure, disabling that warning makes sense to me.

schanzen

2019-08-01 10:24

manager   ~0014765

Fixed in 37a32e37e..b97b12fab

schanzen

2019-11-08 11:29

manager   ~0015068

housekeeping

Issue History

Date Modified Username Field Change
2019-07-21 21:07 schanzen New Issue
2019-07-21 21:07 schanzen Note Added: 0014719
2019-07-23 12:59 schanzen Assigned To => schanzen
2019-07-23 12:59 schanzen Status new => resolved
2019-07-23 12:59 schanzen Resolution open => fixed
2019-07-23 12:59 schanzen Fixed in Version => 0.11.6
2019-07-23 12:59 schanzen Note Added: 0014720
2019-07-23 13:00 schanzen Status resolved => feedback
2019-07-23 13:00 schanzen Resolution fixed => reopened
2019-07-23 13:00 schanzen Note Added: 0014721
2019-07-23 13:00 schanzen Status feedback => new
2019-07-23 13:00 schanzen Note Added: 0014722
2019-07-29 17:56 Christian Grothoff Note Added: 0014756
2019-07-31 13:57 schanzen Note Added: 0014762
2019-07-31 19:49 Christian Grothoff Note Added: 0014763
2019-08-01 10:23 schanzen Product Version => 0.11.7
2019-08-01 10:23 schanzen Target Version => 0.11.7
2019-08-01 10:24 schanzen Status new => resolved
2019-08-01 10:24 schanzen Fixed in Version 0.11.6 => 0.11.7
2019-08-01 10:24 schanzen Note Added: 0014765
2019-11-08 11:29 schanzen Note Added: 0015068
2019-11-08 11:29 schanzen Status resolved => closed