zfl9 / ipt2socks

将 iptables/nftables 传入的透明代理流量转为 socks5 流量的实用工具
GNU Affero General Public License v3.0
411 stars 94 forks source link

openwrt 下的编译警告 #2

Closed pexcn closed 4 years ago

pexcn commented 4 years ago
# ......
In file included from netutils.c:3:0:
netutils.c: In function 'set_nofile_limit':
logutils.h:21:16: warning: format '%lu' expects argument of type 'long unsigned int', but argument 8 has type 'rlim_t {aka long long unsigned int}' [-Wformat=]
         printf("\e[1;35m%04d-%02d-%02d %02d:%02d:%02d ERR:\e[0m " fmt "\n",  \
                ^
logutils.h:21:16: note: in definition of macro 'LOGERR'
         printf("\e[1;35m%04d-%02d-%02d %02d:%02d:%02d ERR:\e[0m " fmt "\n",  \
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
netutils.c:290:56: note: format string is defined here
         LOGERR("[set_nofile_limit] setrlimit(nofile, %lu): (%d) %s", nofile, errno, errstring(errno));
                                                      ~~^
                                                      %llu
netutils.c: In function 'run_as_user':
netutils.c:310:9: warning: implicit declaration of function 'initgroups'; did you mean 'getgroups'? [-Wimplicit-function-declaration]
     if (initgroups(userinfo->pw_name, userinfo->pw_gid) < 0) {
         ^~~~~~~~~~
         getgroups
# ......

https://github.com/zfl9/ipt2socks/issues/1 是否跟这个警告有关?

pexcn commented 4 years ago

順帶一提,dns2tcp, chinadns-ng 和 ipt2socks 的 makefile 這個位置都多了個空格 😅 Screenshot_20191017-011700

zfl9 commented 4 years ago

更新再试下,是否还有编译警告?