zfl9 / ipt2socks

将 iptables/nftables 传入的透明代理流量转为 socks5 流量的实用工具

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

openwrt 下的编译警告

pexcn opened this issue · comments

# ......
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
# ......

#1 是否跟这个警告有关?

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

commented

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