Commit b07b6739 authored by xuchunmei's avatar xuchunmei
Browse files

fix build error with gcc9.2



with gcc9.2, it will get error like this:
In file included from rb-file-helpers.c:51:
rb-file-helpers.c: In function 'rb_find_plugin_data_file':
rb-debug.h:41:23: error: '%s' directive argument is null
[-Werror=format-overflow=]
   41 | #define rb_debug(...) rb_debug_realf (__FUNCTION__, __FILE__,
__LINE__, TRUE, __VA_ARGS__)
      |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rb-file-helpers.c:278:2: note: in expansion of macro 'rb_debug'
  278 |  rb_debug ("found '%s' when searching for file '%s' for plugin
'%s'",
      |  ^~~~~~~~
rb-file-helpers.c:278:20: note: format string is defined here
  278 |  rb_debug ("found '%s' when searching for file '%s' for plugin
'%s'",
      |                    ^~
cc1: all warnings being treated as errors
Signed-off-by: xuchunmei's avatarChunmei Xu <xuchunmei@linux.alibaba.com>
parent e75db863
Pipeline #188259 passed with stage
in 11 minutes and 31 seconds
......@@ -275,8 +275,10 @@ rb_find_plugin_data_file (GObject *object, const char *name)
}
}
rb_debug ("found '%s' when searching for file '%s' for plugin '%s'",
ret, name, plugin_name);
if (ret != NULL) {
rb_debug ("found '%s' when searching for file '%s' for plugin '%s'",
ret, name, plugin_name);
}
/* ensure it's an absolute path */
if (ret != NULL && ret[0] != '/') {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment