Am 20.03.2011 11:10, schrieb Michael Biebl: > Am 20.03.2011 02:47, schrieb Michael Biebl: >> Am 19.03.2011 20:16, schrieb Dan Williams: >>> VPN plugins to follow. Thanks to everyone so far for their testing, >>> lets keep at it til we're done. Areas of interest are WiFi scanning >> >> A few issues I found while testing the 0.8.997 tarball (on Debian sid, GCC 4.5, >> i386) >> >> 1/ it fails to build with --enable-more-warnings (due to -Werror) >> >> libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../include >> -I../../marshallers -I../../src/logging -I../../libnm-util -I../../src -pthread >> -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 >> -I/usr/lib/glib-2.0/include -pthread -I/usr/include/glib-2.0 >> -I/usr/lib/glib-2.0/include -DG_DISABLE_DEPRECATED >> -DLIBEXECDIR=\"/usr/local/libexec\" -DLOCALSTATEDIR=\"/usr/local/var\" >> -DDHCLIENT_PATH=\"/sbin/dhclient\" -DDHCPCD_PATH=\"\" -Wall -Werror -std=gnu89 >> -g -O2 -Wshadow -Wmissing-declarations -Wmissing-prototypes >> -Wdeclaration-after-statement -Wfloat-equal -Wno-unused-parameter >> -Wno-sign-compare -fno-strict-aliasing -Wno-unused-but-set-variable -MT >> libdhcp_manager_la-nm-dhcp-manager.lo -MD -MP -MF >> .deps/libdhcp_manager_la-nm-dhcp-manager.Tpo -c nm-dhcp-manager.c -fPIC -DPIC >> -o .libs/libdhcp_manager_la-nm-dhcp-manager.o >> cc1: warnings being treated as errors >> nm-dhcp-manager.c: In function 'nm_dhcp_manager_handle_event': >> nm-dhcp-manager.c:238:3: error: format '%zd' expects type 'signed size_t', but >> argument 6 has type 'long unsigned int' >> nm-dhcp-manager.c:243:3: error: format '%zd' expects type 'signed size_t', but >> argument 6 has type 'long unsigned int' >> nm-dhcp-manager.c:250:3: error: format '%zd' expects type 'signed size_t', but >> argument 6 has type 'long unsigned int' >> At top level: >> cc1: error: unrecognized command line option "-Wno-unused-but-set-variable" >> make[5]: *** [libdhcp_manager_la-nm-dhcp-manager.lo] Error 1 >> make[5]: Leaving directory `/tmp/NetworkManager-0.8.997/src/dhcp-manager' >> > > "faulty" commit is d815cb9f33ce1aba7b570343caa27d95f014a074 Well, not faulty really, just stricter format checking causing the build failure. As temp is of unsigned long, I changed src/dhcp-manager/nm-dhcp-manager.c to use %lu. For printf() time_t in src/ip6-manager/nm-ip6-manager.c , I followed http://lists.freebsd.org/pipermail/freebsd-ports/2006-January/028656.html Patch attached -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
From d86a7210147b11808f3df2d84c02446a18cc36d4 Mon Sep 17 00:00:00 2001 From: Michael Biebl <biebl debian org> Date: Sun, 20 Mar 2011 12:05:50 +0100 Subject: [PATCH] logger: printf formatting fixes For printf() time_t see http://lists.freebsd.org/pipermail/freebsd-ports/2006-January/028656.html --- src/dhcp-manager/nm-dhcp-manager.c | 6 +++--- src/ip6-manager/nm-ip6-manager.c | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/dhcp-manager/nm-dhcp-manager.c b/src/dhcp-manager/nm-dhcp-manager.c index 8e2392d..23dc3d0 100644 --- a/src/dhcp-manager/nm-dhcp-manager.c +++ b/src/dhcp-manager/nm-dhcp-manager.c @@ -235,19 +235,19 @@ nm_dhcp_manager_handle_event (DBusGProxy *proxy, client = get_client_for_pid (manager, (GPid) temp); if (client == NULL) { - nm_log_warn (LOGD_DHCP, "(pid %zd) unhandled DHCP event for interface %s", temp, iface); + nm_log_warn (LOGD_DHCP, "(pid %lu) unhandled DHCP event for interface %s", temp, iface); goto out; } if (strcmp (iface, nm_dhcp_client_get_iface (client))) { - nm_log_warn (LOGD_DHCP, "(pid %zd) received DHCP event from unexpected interface '%s' (expected '%s')", + nm_log_warn (LOGD_DHCP, "(pid %lu) received DHCP event from unexpected interface '%s' (expected '%s')", temp, iface, nm_dhcp_client_get_iface (client)); goto out; } reason = get_option (options, "reason"); if (reason == NULL) { - nm_log_warn (LOGD_DHCP, "(pid %zd) DHCP event didn't have a reason", temp); + nm_log_warn (LOGD_DHCP, "(pid %lu) DHCP event didn't have a reason", temp); goto out; } diff --git a/src/ip6-manager/nm-ip6-manager.c b/src/ip6-manager/nm-ip6-manager.c index c158496..53a21de 100644 --- a/src/ip6-manager/nm-ip6-manager.c +++ b/src/ip6-manager/nm-ip6-manager.c @@ -701,9 +701,9 @@ process_nduseropt_rdnss (NMIP6Device *device, struct nd_opt_hdr *opt) cur_server->expires = server.expires; if (server.expires > 0) { - nm_log_dbg (LOGD_IP6, "(%s): refreshing RA-provided nameserver %s (expires in %zd seconds)", + nm_log_dbg (LOGD_IP6, "(%s): refreshing RA-provided nameserver %s (expires in %jd seconds)", device->iface, buf, - server.expires - now); + (intmax_t)server.expires - now); break; } @@ -720,8 +720,8 @@ process_nduseropt_rdnss (NMIP6Device *device, struct nd_opt_hdr *opt) if (i < device->rdnss_servers->len) continue; - nm_log_dbg (LOGD_IP6, "(%s): found RA-provided nameserver %s (expires in %zd seconds)", - device->iface, buf, server.expires - now); + nm_log_dbg (LOGD_IP6, "(%s): found RA-provided nameserver %s (expires in %jd seconds)", + device->iface, buf, (intmax_t)server.expires - now); server.addr = *addr; g_array_append_val (new_servers, server); @@ -843,9 +843,9 @@ process_nduseropt_dnssl (NMIP6Device *device, struct nd_opt_hdr *opt) cur_domain->expires = domain.expires; if (domain.expires > 0) { - nm_log_dbg (LOGD_IP6, "(%s): refreshing RA-provided domain %s (expires in %zd seconds)", + nm_log_dbg (LOGD_IP6, "(%s): refreshing RA-provided domain %s (expires in %jd seconds)", device->iface, domain_str, - domain.expires - now); + (intmax_t)domain.expires - now); break; } @@ -862,8 +862,8 @@ process_nduseropt_dnssl (NMIP6Device *device, struct nd_opt_hdr *opt) if (i < device->dnssl_domains->len) continue; - nm_log_dbg (LOGD_IP6, "(%s): found RA-provided domain %s (expires in %zd seconds)", - device->iface, domain_str, domain.expires - now); + nm_log_dbg (LOGD_IP6, "(%s): found RA-provided domain %s (expires in %jd seconds)", + device->iface, domain_str, (intmax_t)domain.expires - now); g_assert (strlen (domain_str) < sizeof (domain.domain)); strcpy (domain.domain, domain_str); -- 1.7.4.1
Attachment:
signature.asc
Description: OpenPGP digital signature