opkg: Fix -Wformat-overflow warning
authorRosen Penev <rosenp@gmail.com>
Fri, 29 Nov 2019 21:08:32 +0000 (13:08 -0800)
committerPetr Štetiar <ynezz@true.cz>
Tue, 21 Jan 2020 07:32:48 +0000 (08:32 +0100)
A null pointer is being passed to printf. This can lead to problems.

Fixes warning:

error: '%s' directive argument is null [-Werror=format-overflow=]
   41 |    opkg_message(l, "%s: "fmt, __FUNCTION__, ##args); \
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: in expansion of macro 'opkg_msg'
   45 |  opkg_msg(l, fmt": %s.\n", ##args, strerror(errno))
      |  ^~~~~~~~
note: in expansion of macro 'opkg_perror'
  247 |   opkg_perror(ERROR, "Failed to create temporary directory '%s'",

Signed-off-by: Rosen Penev <rosenp@gmail.com>

No differences found