cargabsj175 / reaver-wps

Automatically exported from code.google.com/p/reaver-wps
0 stars 0 forks source link

Compile error with gcc 4.6: wpscrack.c:38:30: warning: variable ‘r’ set but not used [-Wunused-but-set-variable] #190

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
..
wpscrack.c: In function ‘main’:
wpscrack.c:39:6: error: redefinition of ‘ret_val’
wpscrack.c:38:6: note: previous definition of ‘ret_val’ was here
wpscrack.c:38:30: warning: variable ‘r’ set but not used 
[-Wunused-but-set-variable]
make: *** [reaver] Error 1

reaver 1.4

Original issue reported on code.google.com by jimbobpa...@gmail.com on 27 Jan 2012 at 2:05

GoogleCodeExporter commented 9 years ago
Problem too

Original comment by a.eremen...@gmail.com on 21 May 2012 at 6:20

GoogleCodeExporter commented 9 years ago
Easy you need a GCC 4.7 version. It works!

Original comment by a.eremen...@gmail.com on 21 May 2012 at 6:38

GoogleCodeExporter commented 9 years ago
wpscrack.c: In function ‘main’:
wpscrack.c:38:30: warning: variable ‘r’ set but not used 
[-Wunused-but-set-variable]

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.7/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 
4.7.0-7ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs 
--enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr 
--program-suffix=-4.7 --enable-shared --enable-linker-build-id 
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext 
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 
--libdir=/usr/lib --enable-nls --disable-bootstrap --with-sysroot=/ 
--enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes 
--enable-gnu-unique-object --enable-plugin --enable-objc-gc 
--enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic 
--enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu 
--target=i686-linux-gnu
Thread model: posix
gcc version 4.7.0 (Ubuntu/Linaro 4.7.0-7ubuntu3) 

any suggestions ?

Original comment by bum...@googlemail.com on 26 May 2012 at 6:55

GoogleCodeExporter commented 9 years ago
anas@anas-Inspiron-N4030:~/Desktop/reaver-1.4/src$ make
(cd utils && make)
make[1]: Entering directory `/home/anas/Desktop/reaver-1.4/src/utils'
  CC  base64.c
  CC  common.c
  CC  ip_addr.c
  CC  radiotap.c
  CC  trace.c
  CC  uuid.c
  CC  wpa_debug.c
  CC  wpabuf.c
  CC  os_unix.c
  CC  eloop.c
ar crT libutils.a base64.o common.o ip_addr.o radiotap.o trace.o uuid.o 
wpa_debug.o wpabuf.o os_unix.o eloop.o
make[1]: Leaving directory `/home/anas/Desktop/reaver-1.4/src/utils'
(cd tls && make)
make[1]: Entering directory `/home/anas/Desktop/reaver-1.4/src/tls'
  CC  asn1.c
In file included from bignum.c:21:0:
libtommath.c: In function ‘mp_exptmod’:
libtommath.c:580:7: warning: variable ‘dr’ set but not used 
[-Wunused-but-set-variable]
  CC  bignum.c
  CC  pkcs1.c
  CC  pkcs5.c
  CC  pkcs8.c
  CC  rsa.c
  CC  tlsv1_client.c
  CC  tlsv1_client_read.c
  CC  tlsv1_client_write.c
  CC  tlsv1_common.c
  CC  tlsv1_cred.c
  CC  tlsv1_record.c
  CC  tlsv1_server.c
tlsv1_server_read.c: In function ‘tls_process_client_key_exchange_rsa’:
tlsv1_server_read.c:474:6: warning: variable ‘encr_len’ set but not used 
[-Wunused-but-set-variable]
  CC  tlsv1_server_read.c
  CC  tlsv1_server_write.c
  CC  x509v3.c
ar crT libtls.a asn1.o bignum.o pkcs1.o pkcs5.o pkcs8.o rsa.o tlsv1_client.o 
tlsv1_client_read.o tlsv1_client_write.o tlsv1_common.o tlsv1_cred.o 
tlsv1_record.o tlsv1_server.o tlsv1_server_read.o tlsv1_server_write.o x509v3.o
make[1]: Leaving directory `/home/anas/Desktop/reaver-1.4/src/tls'
(cd crypto && make)
make[1]: Entering directory `/home/anas/Desktop/reaver-1.4/src/crypto'
  CC  aes-cbc.c
  CC  aes-ctr.c
  CC  aes-eax.c
  CC  aes-encblock.c
  CC  aes-internal.c
  CC  aes-internal-dec.c
  CC  aes-internal-enc.c
  CC  aes-omac1.c
  CC  aes-unwrap.c
  CC  aes-wrap.c
  CC  des-internal.c
  CC  dh_group5.c
  CC  dh_groups.c
  CC  md4-internal.c
  CC  md5.c
  CC  md5-internal.c
  CC  md5-non-fips.c
  CC  milenage.c
  CC  ms_funcs.c
  CC  rc4.c
  CC  sha1.c
  CC  sha1-internal.c
  CC  sha1-pbkdf2.c
  CC  sha1-tlsprf.c
  CC  sha1-tprf.c
  CC  sha256.c
  CC  sha256-internal.c
  CC  crypto_internal.c
  CC  crypto_internal-cipher.c
  CC  crypto_internal-modexp.c
  CC  crypto_internal-rsa.c
  CC  tls_internal.c
  CC  fips_prf_internal.c
ar crT libcrypto.a aes-cbc.o aes-ctr.o aes-eax.o aes-encblock.o aes-internal.o 
aes-internal-dec.o aes-internal-enc.o aes-omac1.o aes-unwrap.o aes-wrap.o 
des-internal.o dh_group5.o dh_groups.o md4-internal.o md5.o md5-internal.o 
md5-non-fips.o milenage.o ms_funcs.o rc4.o sha1.o sha1-internal.o sha1-pbkdf2.o 
sha1-tlsprf.o sha1-tprf.o sha256.o sha256-internal.o crypto_internal.o 
crypto_internal-cipher.o crypto_internal-modexp.o crypto_internal-rsa.o 
tls_internal.o fips_prf_internal.o
make[1]: Leaving directory `/home/anas/Desktop/reaver-1.4/src/crypto'
(cd wps && make)
make[1]: Entering directory `/home/anas/Desktop/reaver-1.4/src/wps'
gcc -I../utils -I ../ wps_attr_build.c -c
gcc -I../utils -I ../ wps_attr_parse.c -c
gcc -I../utils -I ../ wps_attr_process.c -c
gcc -I../utils -I ../ wps.c -c
gcc -I../utils -I ../ wps_common.c -c
gcc -I../utils -I ../ wps_dev_attr.c -c
gcc -I../utils -I ../ wps_enrollee.c -c
gcc -I../utils -I ../ wps_registrar.c -c
gcc -I../utils -I ../ wps_ufd.c -c
make[1]: Leaving directory `/home/anas/Desktop/reaver-1.4/src/wps'
(cd lwe && make BUILD_STATIC=y libiw.a)
make[1]: Entering directory `/home/anas/Desktop/reaver-1.4/src/lwe'
cp wireless.21.h wireless.h
gcc -Os -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow 
-Wpointer-arith -Wcast-qual -Winline -I. -MMD     -fPIC -c -o iwlib.so iwlib.c
iwlib.c: In function ‘iw_get_kernel_we_version’:
iwlib.c:337:8: warning: ignoring return value of ‘fgets’, declared with 
attribute warn_unused_result [-Wunused-result]
iwlib.c:353:8: warning: ignoring return value of ‘fgets’, declared with 
attribute warn_unused_result [-Wunused-result]
iwlib.c: In function ‘iw_enum_devices’:
iwlib.c:254:12: warning: ignoring return value of ‘fgets’, declared with 
attribute warn_unused_result [-Wunused-result]
iwlib.c:255:12: warning: ignoring return value of ‘fgets’, declared with 
attribute warn_unused_result [-Wunused-result]
rm -f libiw.a
ar cru libiw.a iwlib.so
ranlib libiw.a
make[1]: Leaving directory `/home/anas/Desktop/reaver-1.4/src/lwe'
(cd libwps && make)
make[1]: Entering directory `/home/anas/Desktop/reaver-1.4/src/libwps'
gcc -Wall libwps.c -c
libwps.c: In function ‘parse_wps_parameters’:
libwps.c:29:9: warning: variable ‘data_len’ set but not used 
[-Wunused-but-set-variable]
make[1]: Leaving directory `/home/anas/Desktop/reaver-1.4/src/libwps'
gcc -DCONF_DIR='"/usr/local/etc/reaver"' 
-DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 globule.c -c 
gcc -DCONF_DIR='"/usr/local/etc/reaver"' 
-DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Ilibwps 
argsparser.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' 
-DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 init.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' 
-DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 misc.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' 
-DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Ilibwps 
sql.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' 
-DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 builder.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' 
-DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 crc.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' 
-DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Ilibwps 
80211.c -c
80211.c: In function ‘read_ap_beacon’:
80211.c:76:9: warning: variable ‘tag_offset’ set but not used 
[-Wunused-but-set-variable]
gcc -DCONF_DIR='"/usr/local/etc/reaver"' 
-DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 iface.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' 
-DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Ilibwps 
wpsmon.c *.o libwps/*.o wps/*.o tls/bignum.o tls/libtls.a utils/libutils.a 
crypto/libcrypto.a lwe/libiw.a -ldl -lm -lpcap -lsqlite3  -o wash
gcc -DCONF_DIR='"/usr/local/etc/reaver"' 
-DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Ilibwps 
sigint.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' 
-DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 sigalrm.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' 
-DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 keys.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' 
-DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 pins.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' 
-DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 send.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' 
-DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Ilibwps 
exchange.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' 
-DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Ilibwps 
session.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' 
-DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Ilibwps 
cracker.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' 
-DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Ilibwps 
wpscrack.c *.o libwps/*.o wps/*.o tls/bignum.o tls/libtls.a utils/libutils.a 
crypto/libcrypto.a lwe/libiw.a -ldl -lm -lpcap -lsqlite3  -o reaver
wpscrack.c: In function ‘main’:
wpscrack.c:38:30: warning: variable ‘r’ set but not used 
[-Wunused-but-set-variable]

Original comment by silverdu...@gmail.com on 27 Jun 2012 at 9:14

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I have the same problem .linuxMint13

make[1]: Leaving directory `/home/fero/reaver-1.4/src/libwps'
gcc -DCONF_DIR='"/usr/local/etc/reaver"' 
-DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Ilibwps 
wpsmon.c *.o libwps/*.o wps/*.o tls/bignum.o tls/libtls.a utils/libutils.a 
crypto/libcrypto.a lwe/libiw.a -ldl -lm -lpcap -lsqlite3  -o wash
gcc -DCONF_DIR='"/usr/local/etc/reaver"' 
-DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Ilibwps 
wpscrack.c *.o libwps/*.o wps/*.o tls/bignum.o tls/libtls.a utils/libutils.a 
crypto/libcrypto.a lwe/libiw.a -ldl -lm -lpcap -lsqlite3  -o reaver
wpscrack.c: In function ‘main’:
wpscrack.c:38:30: warning: variable ‘r’ set but not used 
[-Wunused-but-set-variable]

any suggestions ?

Original comment by ferobut...@gmail.com on 2 Dec 2012 at 4:56

GoogleCodeExporter commented 9 years ago
Me too

gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2

Original comment by omle...@gmail.com on 22 Jan 2013 at 9:59

GoogleCodeExporter commented 9 years ago
same :(

Original comment by da...@zone-sys.net on 19 Apr 2013 at 5:51

GoogleCodeExporter commented 9 years ago
I had the same issue using GCC 4.7.2-8 on a Fedora 18 x86_64 Machine.
All I can offer you is a workaround with clang...

What I did was installing clang, running the ./configure script and changing 
the Makefile from:

CC=gcc
LIBWPS_DIR=libwps
INC=-I$(LIBWPS_DIR)
prefix=/usr/local
exec_prefix=${prefix}
CONFDIR=${prefix}/etc/reaver
...

to:CC=clang
LIBWPS_DIR=libwps
INC=-I$(LIBWPS_DIR)
prefix=/usr/local
exec_prefix=${prefix}
CONFDIR=${prefix}/etc/reaver
...

another run of make completed without any warnings or issues.

Greetings
Marc

Original comment by m...@dierig.info on 23 May 2013 at 3:48

GoogleCodeExporter commented 9 years ago
I can compile and install reaver despite this warnings
program seems to be OK 

Original comment by alejandr...@gmail.com on 15 Aug 2013 at 10:37

GoogleCodeExporter commented 9 years ago
You can just ignore the error and do,
"sudo reaver" or "sudo -i reaver"
And the program is runnnig and working well.
Enjoy! 

Original comment by jonrip...@gmail.com on 13 Jan 2014 at 7:49