From patchwork Sat Jan 4 16:49:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 2680 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 47qnmv0CKVz3yQm for ; Sat, 4 Jan 2020 16:49:35 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 47qnml5qVTz63g; Sat, 4 Jan 2020 16:49:27 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 47qnml0f0wz2ydB; Sat, 4 Jan 2020 16:49:27 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 47qnmj1FF4z2ySJ for ; Sat, 4 Jan 2020 16:49:25 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 47qnmj0PKYz2Km; Sat, 4 Jan 2020 16:49:25 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1578156565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b21Mb8NqKQlQfWavYQsh/m+4SJXp3nvyqI6c324KGhc=; b=RH2DvqTPok0ZvOGAPuGoVcV7nFlFzZlIVNN37FPRmBukPV3BfND4FzAGX2Xtny5lvj1GS3 +IP309D7j19a/tCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1578156565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b21Mb8NqKQlQfWavYQsh/m+4SJXp3nvyqI6c324KGhc=; b=L/5wBUjOlrmo4tWjVlxy6MtXb9JasfL1kKn1W+Hppbq14EiSa4oWGu0l6MV5NHO/xmJ8ii JBIwqgvTK5sAb3K3WTVxjImbcG4gXH56803jI27J5imRVK741NyRL3zDyRARy1a8lG/BoJ oVWOyyM426Iqfu3HotxBMsrx0cIf6us7VrboYVlGM3sLMccVMfZcNDeibAPiEcpgF2HXMz TdMGjXWKMlJo1du50HSFJXLBAAiwH7HYAcNzi4NJUE54vSMb6FjKdlLSCl/PYhFUf3Ar30 ZwAFrh+Ss2KI8uwzoTlTkDfduxqGelyVbEmbDUwiFQ7s6rqKWZDuZErubQYEeA== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 5/6] glib: Fix compiling with GCC 9 Date: Sat, 4 Jan 2020 16:49:15 +0000 Message-Id: <20200104164916.12051-5-michael.tremer@ipfire.org> In-Reply-To: <20200104164916.12051-1-michael.tremer@ipfire.org> References: <20200104164916.12051-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Michael Tremer --- lfs/glib | 1 + src/patches/glib-2.54.3-compile-fixes-1.patch | 71 +++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 src/patches/glib-2.54.3-compile-fixes-1.patch diff --git a/lfs/glib b/lfs/glib index eb284dd56..662caab90 100644 --- a/lfs/glib +++ b/lfs/glib @@ -71,6 +71,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE) $(UPDATE_AUTOMAKE) + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/glib-2.54.3-compile-fixes-1.patch cd $(DIR_APP) && ./configure --prefix=/usr --sysconfdir=/etc \ --with-pcre=system cd $(DIR_APP) && make $(MAKETUNING) diff --git a/src/patches/glib-2.54.3-compile-fixes-1.patch b/src/patches/glib-2.54.3-compile-fixes-1.patch new file mode 100644 index 000000000..ecf30ded5 --- /dev/null +++ b/src/patches/glib-2.54.3-compile-fixes-1.patch @@ -0,0 +1,71 @@ +From 566e1d61a500267c7849ad0b2552feec9c9a29a6 Mon Sep 17 00:00:00 2001 +From: Ernestas Kulik +Date: Tue, 29 Jan 2019 09:50:46 +0100 +Subject: [PATCH] gdbus: Avoid printing null strings +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This mostly affects the 2.56 branch, but, given that GCC 9 is being +stricter about passing null string pointers to printf-like functions, it +might make sense to proactively fix such calls. + +gdbusauth.c: In function '_g_dbus_auth_run_server': +gdbusauth.c:1302:11: error: '%s' directive argument is null +[-Werror=format-overflow=] + 1302 | debug_print ("SERVER: WaitingForBegin, read '%s'", + line); + | + +gdbusmessage.c: In function ‘g_dbus_message_to_blob’: +gdbusmessage.c:2730:30: error: ‘%s’ directive argument is null [-Werror=format-overflow=] + 2730 | tupled_signature_str = g_strdup_printf ("(%s)", signature_str); + | +--- + gio/gdbusauth.c | 2 +- + gio/gdbusmessage.c | 5 ++--- + 2 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/gio/gdbusauth.c b/gio/gdbusauth.c +index 1f8ea8057..752ec23fc 100644 +--- a/gio/gdbusauth.c ++++ b/gio/gdbusauth.c +@@ -1272,9 +1272,9 @@ _g_dbus_auth_run_server (GDBusAuth *auth, + &line_length, + cancellable, + error); +- debug_print ("SERVER: WaitingForBegin, read '%s'", line); + if (line == NULL) + goto out; ++ debug_print ("SERVER: WaitingForBegin, read '%s'", line); + if (g_strcmp0 (line, "BEGIN") == 0) + { + /* YAY, done! */ +diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c +index 3221b925d..3a1a1f9e9 100644 +--- a/gio/gdbusmessage.c ++++ b/gio/gdbusmessage.c +@@ -2731,7 +2731,6 @@ g_dbus_message_to_blob (GDBusMessage *message, + if (message->body != NULL) + { + gchar *tupled_signature_str; +- tupled_signature_str = g_strdup_printf ("(%s)", signature_str); + if (signature == NULL) + { + g_set_error (error, +@@ -2739,10 +2738,10 @@ g_dbus_message_to_blob (GDBusMessage *message, + G_IO_ERROR_INVALID_ARGUMENT, + _("Message body has signature “%s” but there is no signature header"), + signature_str); +- g_free (tupled_signature_str); + goto out; + } +- else if (g_strcmp0 (tupled_signature_str, g_variant_get_type_string (message->body)) != 0) ++ tupled_signature_str = g_strdup_printf ("(%s)", signature_str); ++ if (g_strcmp0 (tupled_signature_str, g_variant_get_type_string (message->body)) != 0) + { + g_set_error (error, + G_IO_ERROR, +-- +2.22.0 +