ports/devel/kronosnet/files/patch-libknet_common.c
Tobias Kortkamp 6b0bebe2f8 devel/kronosnet: Unbreak build with GCC 9
In file included from common.c:22:
In function 'open_lib',
    inlined from 'load_module' at common.c:130:11:
logging.h:21:17: error: '%s' directive argument is null [-Werror=format-overflow=]
   21 | #define LOG_MSG log_msg
      |                 ^
logging.h:30:2: note: in expansion of macro 'LOG_MSG'
   30 |  LOG_MSG(knet_h, subsys, KNET_LOG_WARN, fmt, ##args)
      |  ^~~~~~~
common.c:85:3: note: in expansion of macro 'log_warn'
   85 |   log_warn(knet_h, KNET_SUB_COMMON, "unable to dlinfo %s: %s",
      |   ^~~~~~~~
common.c: In function 'load_module':
common.c:85:59: note: format string is defined here
   85 |   log_warn(knet_h, KNET_SUB_COMMON, "unable to dlinfo %s: %s",
      |

PR:		238330
Obtained from:	upstream
2019-06-17 11:52:50 +00:00

22 lines
776 B
C

From 97924ac12d8da26b61d3bc3ab90fbd86b0b58e72 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny@redhat.com>
Date: Thu, 24 Jan 2019 14:54:24 +0100
Subject: [PATCH] [common] fix not reporting a true dlinfo error cause
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This was automatically caught with GCC 9
("'%s' directive argument is null").
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
--- libknet/common.c.orig 2018-02-25 04:32:12 UTC
+++ libknet/common.c
@@ -82,6 +82,7 @@ static void *open_lib(knet_handle_t knet_h, const char
/*
* should we dlclose and return error?
*/
+ error = dlerror();
log_warn(knet_h, KNET_SUB_COMMON, "unable to dlinfo %s: %s",
libname, error);
} else {