Code changes to fix build warnings/bugs for the application built in the lib/libalias/libalias folder
Diff Detail
Diff Detail
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 10087 Build 10511: arc lint + arc unit
Event Timeline
Comment Actions
Changelog:
Pre-fix warnings located at: https://gist.github.com/aprieger-llnw/e21689151f16ceb4aed8bfb4ce031853
- sys/netinet/libalias/alias.c
- warning: cast from 'char *' to 'struct ip *' increases required alignment from 1 to 2 [-Wcast-align]
- fix: added the (void *) explicit modifier to force alignment on lines 1236, 1255, 1281, 1282, 1324, 1455, 1563
- taking address of packed member 'ip_dst' of class or structure 'ip' may result in an unaligned pointer value [-Waddress-of-packed-member]
- fix: created new in_addr variable dst to use in the function in place of the packed member on lines 1371, 1377
- warning: taking address of packed member 'ip_src' of class or structure 'ip' may result in an unaligned pointer value [-Waddress-of-packed-member]
- fix: created new in_addr variable src to use in the function in place of the packed member on lines 1525, 1533
- warning: cast from 'char *' to 'struct ip *' increases required alignment from 1 to 2 [-Wcast-align]
- sys/netinet/libalias/alias_db.c
- warning: cast from 'ipfw_insn *' (aka 'struct _ipfw_insn *') to 'ipfw_insn_ip *' (aka 'struct _ipfw_insn_ip *') increases required alignment from 2 to 4 [-Wcast-align]
- fix: added the (void *) explicit modifier to force alignment on lines 2666, 2698
- warning: cast from 'ipfw_insn *' (aka 'struct _ipfw_insn *') to 'u_int32_t *' (aka 'unsigned int *') increases required alignment from 2 to 4 [-Wcast-align]
- fix: added the (void *) explicit modifier to force alignment on lines 2698, 2701
- warning: cast from 'ipfw_insn *' (aka 'struct _ipfw_insn *') to 'ipfw_insn_ip *' (aka 'struct _ipfw_insn_ip *') increases required alignment from 2 to 4 [-Wcast-align]
- sys/netinet/libalias/alias_proxy.c
- warning: cast from 'u_char *' (aka 'unsigned char *') to 'u_short *' (aka 'unsigned short *') increases required alignment from 1 to 2 [-Wcast-align]
- fix: added the (void *) explicit modifier to force alignment on lines 428
- warning: cast from 'u_char *' (aka 'unsigned char *') to 'u_short *' (aka 'unsigned short *') increases required alignment from 1 to 2 [-Wcast-align]
- sys/netinet/libalias/alias_mod.c
- warning: no previous extern declaration for non-static variable 'dll_chain' [-Wmissing-variable-declarations]
- fix: added the (void *) explicit modifier to force alignment on lines 130
- warning: no previous extern declaration for non-static variable 'dll_chain' [-Wmissing-variable-declarations]