ippool: Fix build errors found by clang
PATCH 1/7 ippool: Fix build errors found by clang
Signed-off-by Khem Raj <[email protected]>
--- .../ippool/ippool/0001-read-returns-ssize_t.patch | 31 ++++++++++++ ...02-Mark-first-element-of-a-string-as-null.patch | 31 ++++++++++++ ...003-cli-Mark-return-of-strtol-as-long-int.patch | 58 ++++++++++++++++++++++ .../recipes-daemons/ippool/ippool_1.3.bb | 5 +- 4 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 meta-networking/recipes-daemons/ippool/ippool/0001-read-returns-ssize_t.patch create mode 100644 meta-networking/recipes-daemons/ippool/ippool/0002-Mark-first-element-of-a-string-as-null.patch create mode 100644 meta-networking/recipes-daemons/ippool/ippool/0003-cli-Mark-return-of-strtol-as-long-int.patch
meta-networking/recipes-daemons/ippool/ippool/0001-read-returns-ssize_t.patch new file +31 -0
@@ -0,0 +1,31 @@ +From e4e0aae139b6489dc582fd14e54e562126482ce2 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Sat, 26 Aug 2017 07:23:53 -0700 +Subject: [PATCH 1/3] read() returns ssize_t + +Fixes +usl_fd.c:284:10: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare] + if (nb < 0) { + ~~ ^ ~ + +Signed-off-by: Khem Raj <[email protected]> +--- + usl/usl_fd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/usl/usl_fd.c b/usl/usl_fd.c +index 3b7a813..04ba48c 100644 +--- a/usl/usl_fd.c ++++ b/usl/usl_fd.c +@@ -280,7 +280,7 @@ size_t usl_fd_read(int fd, void *buf, size_t count) + char *ptr = buf; + + for (chars_read = 0; chars_read < count; ) { +- size_t nb = read(fd, ptr, count - chars_read); ++ ssize_t nb = read(fd, ptr, count - chars_read); + if (nb < 0) { + if (errno == EINTR) + continue; +-- +2.14.1 +
meta-networking/recipes-daemons/ippool/ippool/0002-Mark-first-element-of-a-string-as-null.patch new file +31 -0
@@ -0,0 +1,31 @@ +From cf25576428903168cd41b183fb1ca9c2b7e2666e Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Sat, 26 Aug 2017 07:28:10 -0700 +Subject: [PATCH 2/3] Mark first element of a string as null + +Fixes +cli_lib.c:427:20: error: expression which evaluates to zero treated as a null pointer constant of type 'char *' [-Werror,-Wnon-literal-null-conversion] + values[arg] = '\0'; + ^~~~ + +Signed-off-by: Khem Raj <[email protected]> +--- + cli/cli_lib.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cli/cli_lib.c b/cli/cli_lib.c +index 41a0b06..e4d2fd5 100644 +--- a/cli/cli_lib.c ++++ b/cli/cli_lib.c +@@ -424,7 +424,7 @@ int cli_find_args(int argc, char *argv[], struct cli_node *cmd, struct cli_node + if (arg_string[1] == '\0') { + /* no arg value - only allowed for string args */ + if (node->arg->parser == cli_arg_parse_string) { +- values[arg] = '\0'; ++ *values[arg] = '\0'; + } else { + result = -EINVAL; + break; +-- +2.14.1 +
meta-networking/recipes-daemons/ippool/ippool/0003-cli-Mark-return-of-strtol-as-long-int.patch new file +58 -0
58 lines not on this page · raw message
meta-networking/recipes-daemons/ippool/ippool_1.3.bb +4 -1
@@ -21,7 +21,10 @@ SRC_URI = "https://sourceforge.net/projects/openl2tp/files/${BPN}/${PV}/${BPN}-$ file://makefile-add-ldflags.patch \ file://0001-usl_timer-Check-for-return-value-of-write-API.patch \ file://0001-Respect-flags-from-env.patch \ -" + file://0001-read-returns-ssize_t.patch \ + file://0002-Mark-first-element-of-a-string-as-null.patch \ + file://0003-cli-Mark-return-of-strtol-as-long-int.patch \ + " SRC_URI_append_libc-musl = "\ file://0002-link-with-libtirpc.patch \ file://0003-musl-fixes.patch \
Signature · 1 line
2.14.1
PATCH 2/7 iscsitarget: Fix kernel with new 4.12+ kernel
Signed-off-by Khem Raj <[email protected]>
--- ...vent-netlink_ack-now-requires-4-arguments.patch | 32 ++++++++++++++++++++++ .../iscsitarget/iscsitarget_1.4.20.3+svn502.bb | 4 ++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 meta-networking/recipes-extended/iscsitarget/files/0001-kernel-event-netlink_ack-now-requires-4-arguments.patch
meta-networking/recipes-extended/iscsitarget/files/0001-kernel-event-netlink_ack-now-requires-4-arguments.patch new file +32 -0
@@ -0,0 +1,32 @@ +From cbc5f8151017f45231b75a826f18354a81c287c4 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Sat, 26 Aug 2017 07:52:59 -0700 +Subject: [PATCH] kernel/event: netlink_ack() now requires 4 arguments + +see https://patchwork.kernel.org/patch/9670181/ + +event.c:32:4: error: too few arguments to function 'netlink_ack' +| netlink_ack(skb, nlh, 0); +| ^~~~~~~~~~~ + +Signed-off-by: Khem Raj <[email protected]> +--- + kernel/event.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/kernel/event.c b/kernel/event.c +index ef4adcb..8ba5978 100644 +--- a/kernel/event.c ++++ b/kernel/event.c +@@ -29,7 +29,7 @@ static void event_recv_skb(struct sk_buff *skb) + ietd_pid = NETLINK_CB(skb).portid; + WARN_ON(ietd_pid == 0); + if (nlh->nlmsg_flags & NLM_F_ACK) +- netlink_ack(skb, nlh, 0); ++ netlink_ack(skb, nlh, 0, NULL); + skb_pull(skb, rlen); + } + } +-- +2.14.1 +
meta-networking/recipes-extended/iscsitarget/iscsitarget_1.4.20.3+svn502.bb +3 -1
@@ -14,7 +14,9 @@ SRC_URI = "http://ftp.heanet.ie/mirrors/ubuntu/pool/universe/i/${BPN}/${BPN}_${P file://access-sk_v6_daddr-iff-IPV6-defined.patch \ file://build_with_updated_bio_struct_of_linux_v4.3_and_above.patch \ file://build_with_updated_interfaces_of_linux_v4.8_and_above.patch \ - file://fix-call-trace-of-ahash-API-calling.patch" + file://fix-call-trace-of-ahash-API-calling.patch \ + file://0001-kernel-event-netlink_ack-now-requires-4-arguments.patch \ + " SRC_URI[md5sum] = "ef9bc823bbabd3c772208c00d5f2d089" SRC_URI[sha256sum] = "d3196ccb78a43266dce28587bfe30d8ab4db7566d7bce96057dfbb84100babb5"
Signature · 1 line
2.14.1
PATCH 3/7 vboxguestdrivers: Upgrade to 5.1.26
In reply to Khem RajFixes build with kernel 4.12 along the way
Signed-off-by Khem Raj <[email protected]>
---
.../{vboxguestdrivers_5.1.18.bb => vboxguestdrivers_5.1.26.bb} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename meta-oe/recipes-support/vboxguestdrivers/{vboxguestdrivers_5.1.18.bb => vboxguestdrivers_5.1.26.bb} (93%)meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_5.1.26.bb renamed from meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_5.1.18.bb +2 -2
@@ -14,8 +14,8 @@ VBOX_NAME = "VirtualBox-${PV}" SRC_URI = "http://download.virtualbox.org/virtualbox/${PV}/${VBOX_NAME}.tar.bz2 \ file://Makefile.utils \ " -SRC_URI[md5sum] = "1a7db64cd69ba6d39574fb333e031251" -SRC_URI[sha256sum] = "7ed0959bbbd02826b86b3d5dc8348931ddfab267c31f8ed36ee53c12f5522cd9" +SRC_URI[md5sum] = "d3aec8190c649d7e0d92ba374779dfe3" +SRC_URI[sha256sum] = "b5715035e681a11ef1475f83f9503d34a00f0276b89c572eebec363dda80c8a9" S = "${WORKDIR}/vbox_module"
Signature · 1 line
2.14.1
PATCH 4/7 glmark2: Fix build with clang
In reply to Khem RajSigned-off-by Khem Raj <[email protected]>
--- .../glmark2/files/0001-Fix-clang-warnings.patch | 31 ++++++++++++++++++++++ meta-oe/recipes-benchmark/glmark2/glmark2_git.bb | 9 ++++--- 2 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 meta-oe/recipes-benchmark/glmark2/files/0001-Fix-clang-warnings.patch
meta-oe/recipes-benchmark/glmark2/files/0001-Fix-clang-warnings.patch new file +31 -0
@@ -0,0 +1,31 @@ +From 35e9f80518d666db5f9c62e8072ffbc307b4af4f Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Sat, 26 Aug 2017 08:30:01 -0700 +Subject: [PATCH] Fix clang warnings + +../src/native-state-drm.cpp:334:20: error: cannot pass object of non-trivial type 'std::__cxx11::basic_string<char>' through variadic function; call will abort at runtime [-Wnon-pod-varargs] + dev_path); + ^ +1 error generated. + +Signed-off-by: Khem Raj <[email protected]> +--- + src/native-state-drm.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/native-state-drm.cpp b/src/native-state-drm.cpp +index dc2b323..62566ee 100644 +--- a/src/native-state-drm.cpp ++++ b/src/native-state-drm.cpp +@@ -331,7 +331,7 @@ static int open_using_udev_scan() + if (!valid_fd(fd)) { + // %m is GLIBC specific... Maybe use strerror here... + Log::error("Tried to use '%s' but failed.\nReason : %m", +- dev_path); ++ dev_path.c_str()); + } + else + Log::debug("Success!\n"); +-- +2.14.1 +
meta-oe/recipes-benchmark/glmark2/glmark2_git.bb +5 -4
@@ -15,10 +15,11 @@ PV = "2017.07+${SRCPV}" COMPATIBLE_HOST_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '.*-linux*', 'null', d)}" SRC_URI = "git://github.com/glmark2/glmark2.git;protocol=https \ - file://build-Check-packages-to-be-used-by-the-enabled-flavo.patch \ - file://Fix-configure-for-sqrt-check.patch \ -" -SRCREV = "182dcbffe5c8483eadff025b429ee1aacc69c6c2" + file://build-Check-packages-to-be-used-by-the-enabled-flavo.patch \ + file://Fix-configure-for-sqrt-check.patch \ + file://0001-Fix-clang-warnings.patch \ + " +SRCREV = "ed20c633f1926d1dd78e3e89043c85a81302cbe6" S = "${WORKDIR}/git"
Signature · 1 line
2.14.1
PATCH 5/7 gedit: Fix with with hardening flags and clang
In reply to Khem RajSigned-off-by Khem Raj <[email protected]>
--- ...-qualify-handle_builder_error-with-format.patch | 31 ++++++++++++++++++++++ meta-gnome/recipes-gnome/gedit/gedit_2.30.4.bb | 1 + 2 files changed, 32 insertions(+) create mode 100644 meta-gnome/recipes-gnome/gedit/files/0001-gedit-utils-qualify-handle_builder_error-with-format.patch
meta-gnome/recipes-gnome/gedit/files/0001-gedit-utils-qualify-handle_builder_error-with-format.patch new file +31 -0
@@ -0,0 +1,31 @@ +From 623ffac1f6e7725041b386e0f2933fe36809b5a9 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Sat, 26 Aug 2017 09:04:30 -0700 +Subject: [PATCH] gedit-utils: qualify handle_builder_error() with format + string parameters + +gedit-utils.c:1063:32: error: format string is not a string literal [-Werror,-Wformat-nonliteral] + msg_plain = g_strdup_vprintf (message, args); + ^~~~~~~ + +Signed-off-by: Khem Raj <[email protected]> +--- + gedit/gedit-utils.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gedit/gedit-utils.c b/gedit/gedit-utils.c +index 41a5afd..c800828 100644 +--- a/gedit/gedit-utils.c ++++ b/gedit/gedit-utils.c +@@ -1051,7 +1051,7 @@ gedit_utils_is_valid_uri (const gchar *uri) + return TRUE; + } + +-static GtkWidget * ++static G_GNUC_PRINTF(1, 2) GtkWidget * + handle_builder_error (const gchar *message, ...) + { + GtkWidget *label; +-- +2.14.1 +
meta-gnome/recipes-gnome/gedit/gedit_2.30.4.bb +1 -0
@@ -13,6 +13,7 @@ SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV} file://0001-Remove-help-directory-from-build.patch \ file://0002-suppress-string-format-literal-warning-to-fix-build-.patch \ file://0001-tests-document-saver.c-Define-ACCESSPERMS-if-not-def.patch \ + file://0001-gedit-utils-qualify-handle_builder_error-with-format.patch \ " SRC_URI[archive.md5sum] = "e1eecb0a92a1a363b3d375ec5ac0fb3b" SRC_URI[archive.sha256sum] = "a561fe3dd1d199baede1bd07c4ee65f06fc7c494dd4d3327117f04149a608e3c"
Signature · 1 line
2.14.1
PATCH 6/7 openipmi: Upgrade to 2.0.24
In reply to Khem RajRemove patches which are irrelevant now
Signed-off-by Khem Raj <[email protected]>
---
.../openipmi/files/makefile-add-ldflags.patch | 19 -----
.../openipmi/files/openipmi-don-t-rm-.libs.patch | 32 ---------
...openipmi-remove-host-path-from-la_LDFLAGS.patch | 81 ++++++----------------
.../{openipmi_2.0.22.bb => openipmi_2.0.24.bb} | 9 +--
4 files changed, 26 insertions(+), 115 deletions(-)
delete mode 100644 meta-oe/recipes-support/openipmi/files/makefile-add-ldflags.patch
delete mode 100644 meta-oe/recipes-support/openipmi/files/openipmi-don-t-rm-.libs.patch
rename meta-oe/recipes-support/openipmi/{openipmi_2.0.22.bb => openipmi_2.0.24.bb} (93%)meta-oe/recipes-support/openipmi/files/makefile-add-ldflags.patch deleted +0 -19
@@ -1,19 +0,0 @@ -Add LDFLAGS variable to Makefile.am, make sure the extra linker flags can be passed. - -Upstream-Status: Pending - -Signed-off-by: Yi Zhao <[email protected]> - -diff --git a/swig/perl/Makefile.am b/swig/perl/Makefile.am -index 2f9ee4c..3a18892 100644 ---- a/swig/perl/Makefile.am -+++ b/swig/perl/Makefile.am -@@ -20,7 +20,7 @@ OpenIPMI_SRC = OpenIPMI_perl.c - OpenIPMI_OBJ = OpenIPMI_wrap.lo OpenIPMI_perl.lo - - OpenIPMI.so: $(OpenIPMI_OBJ) -- $(LIBTOOL) --mode=link $(CC) -shared -module -avoid-version -o $(@:.so=.la) $^ $(OPENIPMI_SWIG_LIBS) $(PERL_POSIX_LIB) -rpath $(PERL_INSTALL_DIR)/auto/OpenIPMI -+ $(LIBTOOL) --mode=link $(CC) -shared -module -avoid-version $(LDFLAGS) -o $(@:.so=.la) $^ $(OPENIPMI_SWIG_LIBS) $(PERL_POSIX_LIB) -rpath $(PERL_INSTALL_DIR)/auto/OpenIPMI - rm -f OpenIPMI.so - mv .libs/OpenIPMI.so . -
meta-oe/recipes-support/openipmi/files/openipmi-don-t-rm-.libs.patch deleted +0 -32
@@ -1,32 +0,0 @@ -From bbd51cf010c80322034f7094e2c6a656aa1f17a7 Mon Sep 17 00:00:00 2001 -From: Wenzong Fan <[email protected]> -Date: Fri, 13 Feb 2015 06:55:33 +0000 -Subject: [PATCH] openipmi: don't rm .libs - -Don't remove .libs after OpenIPMI.so generated, this may cause -dummystuff.so fails to link from the second build with error: - -* error: .libs/dummystuff.o: No such file or directory - -Upstream-Status: Pending - -Signed-off-by: Wenzong Fan <[email protected]> ---- - swig/perl/Makefile.am | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/swig/perl/Makefile.am b/swig/perl/Makefile.am -index 12a282c..2f9ee4c 100644 ---- a/swig/perl/Makefile.am -+++ b/swig/perl/Makefile.am -@@ -23,7 +23,6 @@ OpenIPMI.so: $(OpenIPMI_OBJ) - $(LIBTOOL) --mode=link $(CC) -shared -module -avoid-version -o $(@:.so=.la) $^ $(OPENIPMI_SWIG_LIBS) $(PERL_POSIX_LIB) -rpath $(PERL_INSTALL_DIR)/auto/OpenIPMI - rm -f OpenIPMI.so - mv .libs/OpenIPMI.so . -- rm -rf .libs - - dummystuff.lo: dummystuff.c - $(LIBTOOL) --mode=compile $(COMPILE) -c $< --- -1.9.1 -
meta-oe/recipes-support/openipmi/files/openipmi-remove-host-path-from-la_LDFLAGS.patch +23 -58
96 lines not on this page · raw message
meta-oe/recipes-support/openipmi/openipmi_2.0.24.bb renamed from meta-oe/recipes-support/openipmi/openipmi_2.0.22.bb +3 -6
@@ -26,19 +26,16 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/openipmi/OpenIPMI-${PV}.tar.gz \ file://fix-symlink-install-error-in-cmdlang.patch \ file://openipmi-no-openipmigui-man.patch \ file://openipmi-remove-host-path-from-la_LDFLAGS.patch \ - file://openipmi-don-t-rm-.libs.patch \ file://ipmi-init-fix-the-arguments.patch \ - file://makefile-add-ldflags.patch \ file://do-not-install-pyc-and-pyo.patch \ file://include_sys_types.patch \ file://openipmi-helper \ file://ipmi.service \ " -SRC_URI[md5sum] = "9a4e1f6bb073379c494839201ea10aee" -SRC_URI[sha256sum] = "4988900043c35fcfa9b2bf275d6593904f6429221befb770ba6ecb5502108e55" - S = "${WORKDIR}/OpenIPMI-${PV}" +SRC_URI[md5sum] = "58f9542cbfcb5fe250b77cf88345e1ec" +SRC_URI[sha256sum] = "bca39a27071278a8b74610181ede8df51e155e5e9031bc8eaa3699d1720292b4" inherit autotools-brokensep pkgconfig pythonnative perlnative update-rc.d systemd
@@ -46,7 +43,7 @@ EXTRA_OECONF = "--disable-static \ --with-perl='${STAGING_BINDIR_NATIVE}/perl-native/perl' \ --with-python='${STAGING_BINDIR_NATIVE}/python-native/python' \ --with-pythoninstall='${PYTHON_SITEPACKAGES_DIR}' \ - --with-glibver=2.0 --with-glib12=no" + --with-glibver=2.0" PACKAGECONFIG ??= "gdbm" PACKAGECONFIG[gdbm] = "ac_cv_header_gdbm_h=yes,ac_cv_header_gdbm_h=no,gdbm,"
Signature · 1 line
2.14.1
PATCH 7/7 libbonoboui: Fix with with hardening and clang
In reply to Khem RajSigned-off-by Khem Raj <[email protected]>
--- ...node-qualify-functions-with-G_GNUC_PRINTF.patch | 49 ++++++++++++++++++++++ .../recipes-gnome/bonobo/libbonoboui_2.24.5.bb | 4 +- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 meta-gnome/recipes-gnome/bonobo/files/0001-bonobo-ui-node-qualify-functions-with-G_GNUC_PRINTF.patch
meta-gnome/recipes-gnome/bonobo/files/0001-bonobo-ui-node-qualify-functions-with-G_GNUC_PRINTF.patch new file +49 -0
@@ -0,0 +1,49 @@ +From b75879e8c3e24d338c0e5843d616bc9b02da4d04 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Sat, 26 Aug 2017 09:52:17 -0700 +Subject: [PATCH] bonobo-ui-node: qualify functions with G_GNUC_PRINTF + +This helps compiler in doing format checking correctly +Fixes +bonobo-ui-node.c:864:38: error: format string is not a string literal [-Werror,-Wformat-nonliteral] +| g_logv ("XML", G_LOG_LEVEL_ERROR, msg, args); + +Signed-off-by: Khem Raj <[email protected]> +--- + bonobo/bonobo-ui-node.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/bonobo/bonobo-ui-node.c b/bonobo/bonobo-ui-node.c +index 9bab5e5..6ec66e2 100644 +--- a/bonobo/bonobo-ui-node.c ++++ b/bonobo/bonobo-ui-node.c +@@ -835,7 +835,7 @@ uiCharacters (ParseState *ps, const xmlChar *chars, int len) + g_string_append_len (ps->content, chars, len); + } + +-static void ++static G_GNUC_PRINTF(2, 3) void + uiWarning (ParseState *ps, const char *msg, ...) + { + va_list args; +@@ -845,7 +845,7 @@ uiWarning (ParseState *ps, const char *msg, ...) + va_end (args); + } + +-static void ++static G_GNUC_PRINTF(2, 3) void + uiError (ParseState *ps, const char *msg, ...) + { + va_list args; +@@ -855,7 +855,7 @@ uiError (ParseState *ps, const char *msg, ...) + va_end (args); + } + +-static void ++static G_GNUC_PRINTF(2, 3) void + uiFatalError (ParseState *ps, const char *msg, ...) + { + va_list args; +-- +2.14.1 +
meta-gnome/recipes-gnome/bonobo/libbonoboui_2.24.5.bb +3 -1
@@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ inherit gnomebase pkgconfig gtk-doc -SRC_URI += "file://gcc5.patch" +SRC_URI += "file://gcc5.patch \ + file://0001-bonobo-ui-node-qualify-functions-with-G_GNUC_PRINTF.patch \ + " SRC_URI[archive.md5sum] = "853be8e28aaa4ce48ba60be7d9046bf4" SRC_URI[archive.sha256sum] = "fab5f2ac6c842d949861c07cb520afe5bee3dce55805151ce9cd01be0ec46fcd"
Signature · 1 line
2.14.1