1. 12 Feb, 2019 7 commits
  2. 11 Feb, 2019 1 commit
  3. 10 Feb, 2019 1 commit
  4. 09 Feb, 2019 1 commit
    • Thomas Haller's avatar
      core: use NM_CMP_*() macro in route_compare() · 668dc1cd
      Thomas Haller authored
      nm_ip_route_get_prefix() and plen are guint type, hence the following
      is not correct:
      
          plen = nm_ip_route_get_prefix (route1);
          r = plen - nm_ip_route_get_prefix (route2);
          if (r)
               return r > 0 ? 1 : -1;
      
      Use the macro, it gets subtle cases like this right.
      
      Fixes: b32bb36c
      668dc1cd
  5. 08 Feb, 2019 8 commits
    • Thomas Haller's avatar
      device: avoid "-Wmissing-braces" warning for initializing "struct in6_addr" · c236dc16
      Thomas Haller authored
      The right way is IN6_ADDR_INIT_ANY.
      
      While at it, don't initialize multiple variables in the same line.
      
          ../src/devices/nm-device-ip-tunnel.c:153:29: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
                  struct in6_addr local6 = { 0 }, remote6 = { 0 };
                                             ^
                                             {}
      c236dc16
    • Thomas Haller's avatar
    • Thomas Haller's avatar
      shared: avoid "-Wmissing-braces" warning initalizing NMIPAddr · 395174f6
      Thomas Haller authored
      NMIPAddr contains an unnamed union. We have to either explicitly
      initialize one field, or omit it.
      
          ../shared/nm-utils/nm-shared-utils.c:38:36: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
          const NMIPAddr nm_ip_addr_zero = { 0 };
                                             ^
                                             {}
      395174f6
    • Thomas Haller's avatar
      libnm: avoid "-Wmissing-braces" warning for test-link.c · a44d276f
      Thomas Haller authored
          ../src/platform/tests/test-link.c: In function ‘_test_wireguard_change’:
          ../src/platform/tests/test-link.c:861:16: warning: missing braces around initializer [-Wmissing-braces]
               endpoint = (NMSockAddrUnion) {
                          ^
          ../src/platform/tests/test-link.c:864:21:
                 .sin_addr   = nmtst_inet4_from_string (nm_sprintf_buf (s_addr, "192.168.7.%d", i)),
                               {                                                                   }
          ../src/platform/tests/test-link.c:861:16: warning: missing braces around initializer [-Wmissing-braces]
               endpoint = (NMSockAddrUnion) {
                          ^
          ../src/platform/tests/test-link.c:864:21:
                 .sin_addr   = nmtst_inet4_from_string (nm_sprintf_buf (s_addr, "192.168.7.%d", i)),
                               {
      a44d276f
    • Thomas Haller's avatar
      tests: avoid "-Wmissing-braces" warning in test_nm_utils_dhcp_client_id_systemd_node_specific() · 4f931a19
      Thomas Haller authored
          [1/2] Compiling C object 'src/tests/a4ccf2d@@test-general@exe/test-general.c.o'.
          ../src/tests/test-general.c: In function ‘test_nm_utils_dhcp_client_id_systemd_node_specific’:
          ../src/tests/test-general.c:2056:16: warning: missing braces around initializer [-Wmissing-braces]
            } d_array[] = {
                          ^
          ../src/tests/test-general.c:2058:20:
              .machine_id = { 0xcb, 0xc2, 0x2e, 0x47, 0x41, 0x8e, 0x40, 0x2a, 0xa7, 0xb3, 0x0d, 0xea, 0x92, 0x83, 0x94, 0xef },
                              {
      4f931a19
    • Thomas Haller's avatar
      wifi/iwd: avoid "-Wstrict-aliasing" warning in nm_device_iwd_set_dbus_object() · 6eaf52a5
      Thomas Haller authored
      The cast is bogus and leads to a compiler warning:
      
          [424/583] Compiling C object src/devices/wifi/914a32e@@nm-device-plugin-wifi@sha/nm-device-iwd.c.o.
          In file included from ../shared/nm-default.h:293,
                           from ../src/devices/wifi/nm-device-iwd.c:21:
          ../src/devices/wifi/nm-device-iwd.c: In function ‘nm_device_iwd_set_dbus_object’:
          ../src/devices/wifi/nm-device-iwd.c:2404:28: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
            if (!nm_g_object_ref_set ((GObject **) &priv->dbus_obj, (GObject *) object))
          ../shared/nm-utils/nm-macros-internal.h:1048:13: note: in definition of macro ‘nm_g_object_ref_set’
             typeof (*(pp)) *const _pp = (pp); \
                       ^~
      6eaf52a5
    • Thomas Haller's avatar
      tests: avoid "-Wduplicate-decl-specifier" warning in test_duplicate_decl_specifier() · 2fe9ade1
      Thomas Haller authored
      The test should check the behavior with "const typeof(a)" in a macro,
      where "a" itself is const. For that we don't need a double const
      declaration of v2.
      
      Also, that fixes an actual compiler warning:
      
          ../src/tests/test-general.c: In function ‘test_duplicate_decl_specifier’:
          ../src/tests/test-general.c:1669:8: warning: duplicate ‘const’ declaration specifier [-Wduplicate-decl-specifier]
            const const int v2 = 3;
                  ^~~~~
      2fe9ade1
    • Thomas Haller's avatar
  6. 07 Feb, 2019 2 commits
  7. 06 Feb, 2019 6 commits
    • Thomas Haller's avatar
      all: don't use "static inline" in source files · d25ed082
      Thomas Haller authored
      For static functions inside a module, the compiler determines on its own
      whether to inline the function.
      
      Also, "inline" was used at some places that don't immediatly look like
      candidates for inlining. It was most likely a copy&paste error.
      d25ed082
    • Thomas Haller's avatar
      all: avoid backslash escape double quote inside single quote · bb341900
      Thomas Haller authored
      It's not necessary.
      bb341900
    • Thomas Haller's avatar
      systemd: update code from upstream (2019-02-05) · 8372c0e9
      Thomas Haller authored
      This is a direct dump from systemd git.
      
      ======
      
      SYSTEMD_DIR=../systemd
      COMMIT=6d6308f6774b4c684de7f3aab12cb752c59d5e2f
      
      (
        cd "$SYSTEMD_DIR"
        git checkout "$COMMIT"
        git reset --hard
        git clean -fdx
      )
      
      git ls-files -z :/src/systemd/src/ \
                      :/shared/systemd/src/ \
                      :/shared/nm-utils/unaligned.h | \
        xargs -0 rm -f
      
      nm_copy_sd_shared() {
          mkdir -p "./shared/systemd/$(dirname "$1")"
          cp "$SYSTEMD_DIR/$1" "./shared/systemd/$1"
      }
      
      nm_copy_sd_core() {
          mkdir -p "./src/systemd/$(dirname "$1")"
          cp "$SYSTEMD_DIR/$1" "./src/systemd/$1"
      }
      
      nm_copy_sd_nmutils() {
          mkdir -p "./shared/nm-utils/"
          cp "$SYSTEMD_DIR/$1" "./shared/nm-utils/${1##*/}"
      }
      
      nm_copy_sd_core "src/libsystemd-network/arp-util.c"
      nm_copy_sd_core "src/libsystemd-network/arp-util.h"
      nm_copy_sd_core "src/libsystemd-network/dhcp-identifier.c"
      nm_copy_sd_core "src/libsystemd-network/dhcp-identifier.h"
      nm_copy_sd_core "src/libsystemd-network/dhcp-internal.h"
      nm_copy_sd_core "src/libsystemd-network/dhcp-lease-internal.h"
      nm_copy_sd_core "src/libsystemd-network/dhcp-network.c"
      nm_copy_sd_core "src/libsystemd-network/dhcp-option.c"
      nm_copy_sd_core "src/libsystemd-network/dhcp-packet.c"
      nm_copy_sd_core "src/libsystemd-network/dhcp-protocol.h"
      nm_copy_sd_core "src/libsystemd-network/dhcp6-internal.h"
      nm_copy_sd_core "src/libsystemd-network/dhcp6-lease-internal.h"
      nm_copy_sd_core "src/libsystemd-network/dhcp6-network.c"
      nm_copy_sd_core "src/libsystemd-network/dhcp6-option.c"
      nm_copy_sd_core "src/libsystemd-network/dhcp6-protocol.h"
      nm_copy_sd_core "src/libsystemd-network/lldp-internal.h"
      nm_copy_sd_core "src/libsystemd-network/lldp-neighbor.c"
      nm_copy_sd_core "src/libsystemd-network/lldp-neighbor.h"
      nm_copy_sd_core "src/libsystemd-network/lldp-network.c"
      nm_copy_sd_core "src/libsystemd-network/lldp-network.h"
      nm_copy_sd_core "src/libsystemd-network/network-internal.c"
      nm_copy_sd_core "src/libsystemd-network/network-internal.h"
      nm_copy_sd_core "src/libsystemd-network/sd-dhcp-client.c"
      nm_copy_sd_core "src/libsystemd-network/sd-dhcp-lease.c"
      nm_copy_sd_core "src/libsystemd-network/sd-dhcp6-client.c"
      nm_copy_sd_core "src/libsystemd-network/sd-dhcp6-lease.c"
      nm_copy_sd_core "src/libsystemd-network/sd-ipv4acd.c"
      nm_copy_sd_core "src/libsystemd-network/sd-ipv4ll.c"
      nm_copy_sd_core "src/libsystemd-network/sd-lldp.c"
      nm_copy_sd_core "src/libsystemd/sd-event/event-source.h"
      nm_copy_sd_core "src/libsystemd/sd-event/event-util.c"
      nm_copy_sd_core "src/libsystemd/sd-event/event-util.h"
      nm_copy_sd_core "src/libsystemd/sd-event/sd-event.c"
      nm_copy_sd_core "src/libsystemd/sd-id128/id128-util.c"
      nm_copy_sd_core "src/libsystemd/sd-id128/id128-util.h"
      nm_copy_sd_core "src/libsystemd/sd-id128/sd-id128.c"
      nm_copy_sd_core "src/shared/dns-domain.c"
      nm_copy_sd_core "src/shared/dns-domain.h"
      nm_copy_sd_core "src/systemd/_sd-common.h"
      nm_copy_sd_core "src/systemd/sd-dhcp-client.h"
      nm_copy_sd_core "src/systemd/sd-dhcp-lease.h"
      nm_copy_sd_core "src/systemd/sd-dhcp6-client.h"
      nm_copy_sd_core "src/systemd/sd-dhcp6-lease.h"
      nm_copy_sd_core "src/systemd/sd-event.h"
      nm_copy_sd_core "src/systemd/sd-id128.h"
      nm_copy_sd_core "src/systemd/sd-ipv4acd.h"
      nm_copy_sd_core "src/systemd/sd-ipv4ll.h"
      nm_copy_sd_core "src/systemd/sd-lldp.h"
      nm_copy_sd_core "src/systemd/sd-ndisc.h"
      nm_copy_sd_nmutils "src/basic/unaligned.h"
      nm_copy_sd_shared "src/basic/alloc-util.c"
      nm_copy_sd_shared "src/basic/alloc-util.h"
      nm_copy_sd_shared "src/basic/async.h"
      nm_copy_sd_shared "src/basic/env-file.c"
      nm_copy_sd_shared "src/basic/env-file.h"
      nm_copy_sd_shared "src/basic/env-util.c"
      nm_copy_sd_shared "src/basic/env-util.h"
      nm_copy_sd_shared "src/basic/escape.c"
      nm_copy_sd_shared "src/basic/escape.h"
      nm_copy_sd_shared "src/basic/ether-addr-util.c"
      nm_copy_sd_shared "src/basic/ether-addr-util.h"
      nm_copy_sd_shared "src/basic/extract-word.c"
      nm_copy_sd_shared "src/basic/extract-word.h"
      nm_copy_sd_shared "src/basic/fd-util.c"
      nm_copy_sd_shared "src/basic/fd-util.h"
      nm_copy_sd_shared "src/basic/fileio.c"
      nm_copy_sd_shared "src/basic/fileio.h"
      nm_copy_sd_shared "src/basic/fs-util.c"
      nm_copy_sd_shared "src/basic/fs-util.h"
      nm_copy_sd_shared "src/basic/hash-funcs.c"
      nm_copy_sd_shared "src/basic/hash-funcs.h"
      nm_copy_sd_shared "src/basic/hashmap.c"
      nm_copy_sd_shared "src/basic/hashmap.h"
      nm_copy_sd_shared "src/basic/hexdecoct.c"
      nm_copy_sd_shared "src/basic/hexdecoct.h"
      nm_copy_sd_shared "src/basic/hostname-util.c"
      nm_copy_sd_shared "src/basic/hostname-util.h"
      nm_copy_sd_shared "src/basic/in-addr-util.c"
      nm_copy_sd_shared "src/basic/in-addr-util.h"
      nm_copy_sd_shared "src/basic/io-util.c"
      nm_copy_sd_shared "src/basic/io-util.h"
      nm_copy_sd_shared "src/basic/list.h"
      nm_copy_sd_shared "src/basic/log.h"
      nm_copy_sd_shared "src/basic/macro.h"
      nm_copy_sd_shared "src/basic/mempool.c"
      nm_copy_sd_shared "src/basic/mempool.h"
      nm_copy_sd_shared "src/basic/missing_fcntl.h"
      nm_copy_sd_shared "src/basic/missing_type.h"
      nm_copy_sd_shared "src/basic/parse-util.c"
      nm_copy_sd_shared "src/basic/parse-util.h"
      nm_copy_sd_shared "src/basic/path-util.c"
      nm_copy_sd_shared "src/basic/path-util.h"
      nm_copy_sd_shared "src/basic/prioq.c"
      nm_copy_sd_shared "src/basic/prioq.h"
      nm_copy_sd_shared "src/basic/process-util.c"
      nm_copy_sd_shared "src/basic/process-util.h"
      nm_copy_sd_shared "src/basic/random-util.c"
      nm_copy_sd_shared "src/basic/random-util.h"
      nm_copy_sd_shared "src/basic/refcnt.h"
      nm_copy_sd_shared "src/basic/set.h"
      nm_copy_sd_shared "src/basic/signal-util.h"
      nm_copy_sd_shared "src/basic/siphash24.h"
      nm_copy_sd_shared "src/basic/socket-util.c"
      nm_copy_sd_shared "src/basic/socket-util.h"
      nm_copy_sd_shared "src/basic/sparse-endian.h"
      nm_copy_sd_shared "src/basic/stat-util.c"
      nm_copy_sd_shared "src/basic/stat-util.h"
      nm_copy_sd_shared "src/basic/stdio-util.h"
      nm_copy_sd_shared "src/basic/string-table.c"
      nm_copy_sd_shared "src/basic/string-table.h"
      nm_copy_sd_shared "src/basic/string-util.c"
      nm_copy_sd_shared "src/basic/string-util.h"
      nm_copy_sd_shared "src/basic/strv.c"
      nm_copy_sd_shared "src/basic/strv.h"
      nm_copy_sd_shared "src/basic/time-util.c"
      nm_copy_sd_shared "src/basic/time-util.h"
      nm_copy_sd_shared "src/basic/tmpfile-util.c"
      nm_copy_sd_shared "src/basic/tmpfile-util.h"
      nm_copy_sd_shared "src/basic/umask-util.h"
      nm_copy_sd_shared "src/basic/utf8.c"
      nm_copy_sd_shared "src/basic/utf8.h"
      nm_copy_sd_shared "src/basic/util.c"
      nm_copy_sd_shared "src/basic/util.h"
      8372c0e9
    • Thomas Haller's avatar
      Squashed 'shared/n-acd/' changes from a409492679..9eb7bf7173 · 7e776266
      Thomas Haller authored
      9eb7bf7173 trivial: fix spelling in code comments
      
      git-subtree-dir: shared/n-acd
      git-subtree-split: 9eb7bf717309fefb253d87e6a1af6660e977d791
      7e776266
    • Thomas Haller's avatar
      Squashed 'shared/c-siphash/' changes from 24e301e329..211cfc5abc · 4dd7869b
      Thomas Haller authored
      211cfc5abc fix spelling in API documentation and code comment
      b24d2e2048 build: only run full matrix on default CI
      8f1fdb72a0 build: update build system
      
      git-subtree-dir: shared/c-siphash
      git-subtree-split: 211cfc5abc3813cddd10d237ba9d843b8d3a8995
      4dd7869b
    • Thomas Haller's avatar
      Squashed 'shared/c-list/' changes from 071841c28d..dda36d30c7 · cd9f57a1
      Thomas Haller authored
      dda36d30c7 build: update build system
      
      git-subtree-dir: shared/c-list
      git-subtree-split: dda36d30c7d655b4d61358519168fa7ce0e9dae9
      cd9f57a1
  8. 05 Feb, 2019 14 commits