View Issue Details

IDProjectCategoryView StatusLast Update
0005816GNUnetDHT servicepublic2019-11-08 10:29
Reporterschanzen Assigned Toschanzen Due Date
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 19:07

administrator   ~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 10:59

administrator   ~0014720

Fixed in b92650ab1..dbf604ad9

schanzen

2019-07-23 11:00

administrator   ~0014721

Wrong bug closed

schanzen

2019-07-23 11:00

administrator   ~0014722

Reopened

Christian Grothoff

2019-07-29 15: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 11:57

administrator   ~0014762

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

Christian Grothoff

2019-07-31 17: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 08:24

administrator   ~0014765

Fixed in 37a32e37e..b97b12fab

schanzen

2019-11-08 10:29

administrator   ~0015068

housekeeping

Issue History

Date ModifiedUsernameFieldChange
2019-07-21 19:07schanzenNew Issue
2019-07-21 19:07schanzenNote Added: 0014719
2019-07-23 10:59schanzenAssigned To => schanzen
2019-07-23 10:59schanzenStatusnew => resolved
2019-07-23 10:59schanzenResolutionopen => fixed
2019-07-23 10:59schanzenFixed in Version => 0.11.6
2019-07-23 10:59schanzenNote Added: 0014720
2019-07-23 11:00schanzenStatusresolved => feedback
2019-07-23 11:00schanzenResolutionfixed => reopened
2019-07-23 11:00schanzenNote Added: 0014721
2019-07-23 11:00schanzenStatusfeedback => new
2019-07-23 11:00schanzenNote Added: 0014722
2019-07-29 15:56Christian GrothoffNote Added: 0014756
2019-07-31 11:57schanzenNote Added: 0014762
2019-07-31 17:49Christian GrothoffNote Added: 0014763
2019-08-01 08:23schanzenProduct Version => 0.11.7
2019-08-01 08:23schanzenTarget Version => 0.11.7
2019-08-01 08:24schanzenStatusnew => resolved
2019-08-01 08:24schanzenFixed in Version0.11.6 => 0.11.7
2019-08-01 08:24schanzenNote Added: 0014765
2019-11-08 10:29schanzenNote Added: 0015068
2019-11-08 10:29schanzenStatusresolved => closed