jeroennijhof/vncpwd

Build warnings

Closed this issue · 1 comments

During build there are warningsregarding using the "char" typed attributes where expected is "unsigned char":

+ /usr/bin/make -O -j4 'CFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic'
gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -o vncpwd vncpwd.c d3des.c
vncpwd.c: In function 'decryptPw':
vncpwd.c:32:9: warning: pointer targets in passing argument 1 of 'des' differ in signedness [-Wpointer-sign]
     des(pPW, clrtxt);
         ^~~
In file included from vncpwd.c:24:0:
d3des.h:57:13: note: expected 'unsigned char *' but argument is of type 'char *'
 extern void des(unsigned char *, unsigned char *);
             ^~~
vncpwd.c:32:14: warning: pointer targets in passing argument 2 of 'des' differ in signedness [-Wpointer-sign]
     des(pPW, clrtxt);
              ^~~~~~
In file included from vncpwd.c:24:0:
d3des.h:57:13: note: expected 'unsigned char *' but argument is of type 'char *'
 extern void des(unsigned char *, unsigned char *);
             ^~~
vncpwd.c: In function 'main':
vncpwd.c:40:9: warning: unused variable 'c' [-Wunused-variable]
     int c;
         ^
vncpwd.c:53:5: warning: ignoring return value of 'fread', declared with attribute warn_unused_result [-Wunused-result]
     fread(pwd, 1024, 1, fp);
     ^~~~~~~~~~~~~~~~~~~~~~~
+ exit 0

Fixed