[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-talk] Tor 0.2.9.4-alpha is released



On Sun, Nov 6, 2016 at 7:35 AM, Dash Four <mr-4@xxxxxxxxxxxxx> wrote:
> Hi Nick,
>
>
> First time this happens (I have been compiling tor sources with this
> compiler since around 2009). Not sure about using the -Wlogical-op warning
> though.
>
> Here is what I get:
>
> ==========================
> gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -I./src/ext -Isrc/ext
> -I./src/ext/trunnel -I./src/trunnel -I./src/common -Isrc/common
> -I./src/ext/trunnel -I./src/trunnel -I./src/or -Isrc/or
> -DSHARE_DATADIR="\"/usr/share\"" -DLOCALSTATEDIR="\"/var\""
> -DBINDIR="\"/usr/bin\"" -I./src/common    -ftrapv   -O2 -g -pipe -Wall
> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
> --param=ssp-buffer-size=4 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
> -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -U_FORTIFY_SOURCE
> -D_FORTIFY_SOURCE=2 -fstack-protector-all -Wstack-protector --param
> ssp-buffer-size=1 -fPIE -fno-omit-frame-pointer -fasynchronous-unwind-tables
> -Wall -fno-strict-aliasing -Waddress -Warray-bounds -Wextra -Winit-self
> -Wlogical-op -Wmissing-field-initializers -Wmissing-format-attribute
> -Wmissing-noreturn -Wnormalized=id -Woverlength-strings -Woverride-init
> -Wshadow -Wstrict-overflow=2 -Wsync-nand -Wunused-but-set-parameter
> -Wunused-but-set-variable -Wvariadic-macros -W -Wfloat-equal -Wundef
> -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings
> -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat=2 -Wwrite-strings
> -Wnested-externs -Wbad-function-cast -Wswitch-enum -Waggregate-return
> -Wpacked -Wunused -Wunused-parameter  -Wold-style-definition
> -Wmissing-declarations -Werror -c -o src/common/util.o src/common/util.c
> cc1: warnings being treated as errors
> src/common/util.c: In function 'tor_strstrip':
> src/common/util.c:643: error: logical '&&' with non-zero constant will
> always evaluate as true
> src/common/util.c: In function 'tor_escape_str_for_pt_args':
> src/common/util.c:1397: error: logical '&&' with non-zero constant will
> always evaluate as true
> src/common/util.c: In function 'str_num_before':
> src/common/util.c:4730: error: logical '&&' with non-zero constant will
> always evaluate as true
> make[1]: *** [src/common/util.o] Error 1
> make[1]: *** Waiting for unfinished jobs....
> make[1]: Leaving directory `/builddir/build/BUILD/tor-0.2.9.4-alpha'
> make: *** [all] Error 2
> error: Bad exit status from /var/tmp/rpm-tmp.fmqO31 (%build)
> ==========================
>
> util.c:643:
>     if (strchr(strip, *readp)) {
>
> util.c:1397:
>     if (strchr(chars_to_escape, *string))
>
> util.c:4730:
>   const char *cp = strchr(s, ch);
>
>
> This link [1] may offer some explanation/workaround (I know it is for a
> different - older - version of gcc, but the point still stands).
>
> For the time being, I use "tor_cv_cflags_Wlogical_op=no" to disable this
> warning, but I am not sure whether this is the correct way of dealing with
> the issue.
>
>
> [1] http://seclists.org/wireshark/2013/Jan/6

Yeah -- my guess here is that you have a version of GCC that is either
much older or much newer than your version of glibc.  Turning off the
warning is a perfectly fine solution.

best wishes,
-- 
Nick
-- 
tor-talk mailing list - tor-talk@xxxxxxxxxxxxxxxxxxxx
To unsubscribe or change other settings go to
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk