From: falcovorbis <fal...@us...> - 2023-03-13 03:08:06
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, warnings_fixes has been updated via 6b831840851c0d8c5a60f6c1e8134cc5fbc6d44b (commit) from d0ced5dd50ced1da229a6adb9029d5a1cfdd38e6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6b831840851c0d8c5a60f6c1e8134cc5fbc6d44b Author: falco <gyr...@gm...> Date: Sun Mar 12 23:07:05 2023 -0400 All warnings are now gone with GCC12! - removed warnings for taking pointers to members of packed structs by adding a pragma to ignore the warning for the scope of each file ----------------------------------------------------------------------- Summary of changes: addons/libkosfat/directory.c | 5 +++++ addons/libkosfat/directory.h | 2 ++ kernel/net/net_icmp6.c | 5 +++++ kernel/net/net_ipv6.c | 5 +++++ kernel/net/net_udp.c | 5 +++++ 5 files changed, 22 insertions(+) diff --git a/addons/libkosfat/directory.c b/addons/libkosfat/directory.c index 7625f06..ad3c17e 100644 --- a/addons/libkosfat/directory.c +++ b/addons/libkosfat/directory.c @@ -18,6 +18,9 @@ #include "directory.h" #include "fatinternal.h" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Waddress-of-packed-member" + #ifdef __STRICT_ANSI__ /* These don't necessarily get prototyped in string.h in standard-compliant mode as they are extensions to the standard. Declaring them this way shouldn't @@ -1391,3 +1394,5 @@ void fat_dentry_print(const fat_dentry_t *ent) { dbglog(DBG_KDEBUG, "Size: %" PRIu32 "\n", ent->size); } #endif + +#pragma GCC diagnostic pop \ No newline at end of file diff --git a/addons/libkosfat/directory.h b/addons/libkosfat/directory.h index f04be5f..3557f06 100644 --- a/addons/libkosfat/directory.h +++ b/addons/libkosfat/directory.h @@ -14,6 +14,8 @@ __BEGIN_DECLS #include "fatfs.h" +#define PACKED __attribute__((packed)) + typedef struct fat_dentry { uint8_t name[11]; uint8_t attr; diff --git a/kernel/net/net_icmp6.c b/kernel/net/net_icmp6.c index 2a913b1..12879eb 100644 --- a/kernel/net/net_icmp6.c +++ b/kernel/net/net_icmp6.c @@ -16,6 +16,9 @@ #include "net_ipv6.h" #include "net_ipv4.h" /* For net_ipv4_checksum() */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Waddress-of-packed-member" + /* This file implements RFC 4443, the Internet Control Message Protocol for IPv6. All messages mentioned below are from that RFC, unless otherwise specified. @@ -802,3 +805,5 @@ int net_icmp6_send_param_prob(netif_t *net, uint8 code, uint32 ptr, return send_err_pkt(net, buf, sizeof(icmp6_param_problem_t), ppkt, psz, mc_allow); } + +#pragma GCC diagnostic pop \ No newline at end of file diff --git a/kernel/net/net_ipv6.c b/kernel/net/net_ipv6.c index 266ff0d..c730a0e 100644 --- a/kernel/net/net_ipv6.c +++ b/kernel/net/net_ipv6.c @@ -15,6 +15,9 @@ #include "net_icmp6.h" #include "net_ipv4.h" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Waddress-of-packed-member" + static net_ipv6_stats_t ipv6_stats = { 0 }; const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT; const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT; @@ -302,3 +305,5 @@ void net_ipv6_shutdown(void) { mac[5] = net_default_dev->ip6_lladdr.s6_addr[15]; net_multicast_del(mac); } + +#pragma GCC diagnostic pop \ No newline at end of file diff --git a/kernel/net/net_udp.c b/kernel/net/net_udp.c index 633e4ff..39c5c74 100644 --- a/kernel/net/net_udp.c +++ b/kernel/net/net_udp.c @@ -23,6 +23,9 @@ #include "net_ipv4.h" #include "net_ipv6.h" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Waddress-of-packed-member" + /* Default hop limit (or ttl for IPv4) for new sockets */ #define UDP_DEFAULT_HOPS 64 @@ -1542,3 +1545,5 @@ void net_udp_shutdown(void) { fs_socket_proto_remove(&proto); fs_socket_proto_remove(&proto_lite); } + +#pragma GCC diagnostic pop \ No newline at end of file hooks/post-receive -- A pseudo Operating System for the Dreamcast. |