前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >gdbusauth.c:1302:11: error: ‘%s’ directive argument is null

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

作者头像
手撕代码八百里
发布2021-09-26 10:46:42
1.9K0
发布2021-09-26 10:46:42
举报
文章被收录于专栏:猿计划
代码语言:javascript
复制
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、找到报错的位置,加入如下代码:

代码语言:javascript
复制
if(line != NULL)

代码语言:javascript
复制
if(signature_str!= NULL)

即可完美解决。

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2021/09/24 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 解决方案
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档