gdbusauth.c:1302:11: error: ‘%s’ directive argument is null

简介: gdbusauth.c:1302:11: error: ‘%s’ directive argument is null
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);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[6]: *** [Makefile:3633:libgio_2_0_la-gdbusauth.lo] 错误 1
make[6]: *** 正在等待未完成的任务....
gdbusmessage.c: In function ‘parse_value_from_blob’:
gdbusmessage.c:1712:29: warning: variable ‘item’ set but not used [-Wunused-but-set-variable]
 1712 |                   GVariant *item;
      |                             ^~~~
gdbusmessage.c: In function ‘append_value_to_blob’:
gdbusmessage.c:2326:24: warning: unused variable ‘end’ [-Wunused-variable]
 2326 |           const gchar *end;
      |                        ^~~
gdbusmessage.c: In function ‘g_dbus_message_to_blob’:
gdbusmessage.c:2702:30: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
 2702 |       tupled_signature_str = g_strdup_printf ("(%s)", signature_str);
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[6]: *** [Makefile:3682:libgio_2_0_la-gdbusmessage.lo] 错误 1
make[5]: *** [Makefile:4471:all-recursive] 错误 1

解决方案

1、找到这个文件使用vim打开

2、找到报错的位置,加入如下代码:

if(line != NULL)

if(signature_str!= NULL)

即可完美解决。

目录
相关文章
成功解决TypeError: ‘encoding’ is an invalid keyword argument for this function
成功解决TypeError: ‘encoding’ is an invalid keyword argument for this function
|
10月前
|
Linux
error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
79 0
|
12月前
TypeError: custom() got an unexpected keyword argument ‘path‘
TypeError: custom() got an unexpected keyword argument ‘path‘
111 0
error: passing ‘const AppJniCommand’ as ‘this’ argument discards qualifiers [-fpermissive]
error: passing ‘const AppJniCommand’ as ‘this’ argument discards qualifiers [-fpermissive]
69 0
error: possibly undefined macro: LT_SYS_SYMBOL_USCORE please use m4_pattern_allow
error: possibly undefined macro: LT_SYS_SYMBOL_USCORE please use m4_pattern_allow
110 0
error: implicit declaration of function ‘RAND_egd’ [-Werror=implicit-function-declaration]
error: implicit declaration of function ‘RAND_egd’ [-Werror=implicit-function-declaration]
95 0
|
C语言
error: implicit declaration of function ‘VerifyFixClassname‘ is invalid in C99 [-Werror,-Wimplicit-f
error: implicit declaration of function ‘VerifyFixClassname‘ is invalid in C99 [-Werror,-Wimplicit-f
116 0
error: ‘nullptr’ was not declared in this scope
error: ‘nullptr’ was not declared in this scope
190 0
解决办法: error: passing ‘const VideoFrame’ as ‘this’ argument discards qualifiers [-fpermissive]
解决办法: error: passing ‘const VideoFrame’ as ‘this’ argument discards qualifiers [-fpermissive]
176 0
错误解决办法:‘NULL’ was not declared in this scope
错误解决办法:‘NULL’ was not declared in this scope
223 0