open-iscsi / open-isns

iSNS server and client for Linux
GNU Lesser General Public License v2.1
26 stars 22 forks source link

socket.c:325:40: error: unused parameter ‘sec’ #30

Closed scaleoutsean closed 4 years ago

scaleoutsean commented 4 years ago

Looks similar to issue 24.

$ ./configure --prefix=/usr --without-slp --without-security
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... yes
checking for sh... /bin/sh
checking for inline... inline
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking for socket in -lsocket... no
checking for getopt_long... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating include/libisns/paths.h
config.status: creating config.h
config.status: config.h is unchanged

$ make
gcc -Wall -Werror -Wextra -g -O2 -I. -Iinclude -I. -I./include -D_GNU_SOURCE -c -o socket.o socket.c
socket.c: In function ‘isns_pdu_authenticate’:
socket.c:325:40: error: unused parameter ‘sec’ [-Werror=unused-parameter]
 isns_pdu_authenticate(isns_security_t *sec,
                                        ^~~
socket.c:326:28: error: unused parameter ‘msg’ [-Werror=unused-parameter]
   struct isns_partial_msg *msg, buf_t *bp)
                            ^~~
socket.c:326:40: error: unused parameter ‘bp’ [-Werror=unused-parameter]
   struct isns_partial_msg *msg, buf_t *bp)
                                        ^~
cc1: all warnings being treated as errors
Makefile:150: recipe for target 'socket.o' failed
make: *** [socket.o] Error 1
gonzoleeman commented 4 years ago

Already fixed upstream, so Ubuntu needs to update their package, or you can build it yourself from upstream.

gonzoleeman commented 4 years ago

Closing.

scaleoutsean commented 4 years ago

Sounds good. Which "upstream" are you referring to - mikechristie/open-isns or this repo? I built from the source downloaded from this repo. In the case Ubuntu needs to upgrade some other package, which one is that (gcc)?

gonzoleeman commented 4 years ago

Sounds good. Which "upstream" are you referring to - mikechristie/open-isns or this repo? I built from the source downloaded from this repo. In the case Ubuntu needs to upgrade some other package, which one is that (gcc)?

Mike's repositories are out of date now, as all of them related to iscsi are now under github.com/open-iscsi.

I meant this repository. You said you were on Ubuntu. You say version v0.100. This issue was fixed two commits after that version tag, in commit 0543f1d02ee7.

So if you use "git pull" you should get the latest code. If you are downloading a v0.100 tarball it won't have the fix in it.

scaleoutsean commented 4 years ago

This issue was fixed two commits after that version tag, in commit 0543f1d.

Thanks. Yes that was it, I thought the most recent release contained the fix as the branch with the fix was removed - didn't look at the dates carefully enough!