MT7688学习笔记 gdate.c:2497:7: error: format not a string literal, format string not checke

此补丁用于解决OpenWRT中使用GLib GDate时出现的字符串格式文字警告问题,通过修改源码确保编译时不再触发此类警告。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

https://dev.openwrt.org/browser/trunk/tools/pkg-config/patches/001-glib-gdate-suppress-string-format-literal-warning.patch
gdate.c: In function 'g_date_strftime': gdate.c:2497:7: error: format not a string literal, format string not checked [-Werror=format-nonliteral] tmplen = strftime (tmpbuf, tmpbufsize, locale_format, &tm); ^~~~~~ cc1: some warnings being treated as errors Makefile:1386: recipe for target 'libglib_2_0_la-gdate.lo' failed make[10]: *** [libglib_2_0_la-gdate.lo] Error 1 make[10]: Leaving directory '/home/zhangjc/openwrt-15.05.1/build_dir/host/pkg-config-0.29/glib/glib' Makefile:1933: recipe for target 'all-recursive' failed make[9]: *** [all-recursive] Error 1 make[9]: Leaving directory '/home/zhangjc/openwrt-15.05.1/build_dir/host/pkg-config-0.29/glib/glib' Makefile:952: recipe for target 'all' failed make[8]: *** [all] Error 2 make[8]: Leaving directory '/home/zhangjc/openwrt-15.05.1/build_dir/host/pkg-config-0.29/glib/glib' Makefile:1045: recipe for target 'all-recursive' failed make[7]: *** [all-recursive] Error 1 make[7]: Leaving directory '/home/zhangjc/openwrt-15.05.1/build_dir/host/pkg-config-0.29/glib' Makefile:769: recipe for target 'all' failed make[6]: *** [all] Error 2 make[6]: Leaving directory '/home/zhangjc/openwrt-15.05.1/build_dir/host/pkg-config-0.29/glib' Makefile:697: recipe for target 'all-recursive' failed make[5]: *** [all-recursive] Error 1 make[5]: Leaving directory '/home/zhangjc/openwrt-15.05.1/build_dir/host/pkg-config-0.29' Makefile:456: recipe for target 'all' failed make[4]: *** [all] Error 2 make[4]: Leaving directory '/home/zhangjc/openwrt-15.05.1/build_dir/host/pkg-config-0.29' Makefile:39: recipe for target '/home/zhangjc/openwrt-15.05.1/build_dir/host/pkg-config-0.29/.built' failed make[3]: *** [/home/zhangjc/openwrt-15.05.1/build_dir/host/pkg-config-0.29/.built] Error 2 make[3]: Leaving directory '/home/zhangjc/openwrt-15.05.1/tools/pkg-config' tools/Makefile:122: recipe for target 'tools/pkg-config/compile' failed make[2]: *** [tools/pkg-config/compile] Error 2 make[2]: Leaving directory '/home/zhangjc/openwrt-15.05.1' tools/Makefile:121: recipe for target '/home/zhangjc/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/stamp/.tools_install_yynyynynynyyyyyyyyynyyyyyyyyynyyyyynnyyynnyynnnyy' failed make[1]: *** [/home/zhangjc/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/stamp/.tools_install_yynyynynynyyyyyyyyynyyyyyyyyynyyyyynnyyynnyynnnyy] Error 2 make[1]: Leaving directory '/home/zhangjc/openwrt-15.05.1' /home/zhangjc/openwrt-15.05.1/include/toplevel.mk:182: recipe for target 'world' failed make: *** [world] Error 2
08-08
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值