Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#3 Building zsh-net produces lot of warnings

open
nobody
None
5
2010-08-04
2010-08-04
andalou
No

I downloaded WinZsh, version 3.0.8deb14_NT_0.78.1, and it works fine but
if I compile zsh-nt from the git repository on Win XP with MinGW, gcc
4.5.0, I get the following warnings:

--------------------
...
...
gcc -I.. -I. -Iwinnt -Ilibseh -DHAVE_CONFIG_H -DHAVE_DIRENT_H -DWINNT -DMINGW -Wall -Wno-unused-value -mthreads -funsigned-char -O0 -obuiltin.o -c builtin.c
builtin.c: In function 'typeset_single':
builtin.c:2887:9: warning: operation on 'on' may be undefined
builtin.c: In function 'bin_read':
builtin.c:5099:6: warning: pointer targets in passing argument 2 of 'force_read' differ in signedness
winnt/ntport.h:359:6: note: expected 'unsigned char *' but argument is of type 'char *'
builtin.c:5113:3: warning: pointer targets in passing argument 2 of 'nt_read' differ in signedness
winnt/ntport.h:358:6: note: expected 'unsigned char *' but argument is of type 'char *'
builtin.c: In function 'zread':
builtin.c:5450:2: warning: pointer targets in passing argument 2 of 'force_read' differ in signedness
winnt/ntport.h:359:6: note: expected 'unsigned char *' but argument is of type 'char *'
gcc -I.. -I. -Iwinnt -Ilibseh -DHAVE_CONFIG_H -DHAVE_DIRENT_H -DWINNT -DMINGW -Wall -Wno-unused-value -mthreads -funsigned-char -O0 -ocompat.o -c compat.c
gcc -I.. -I. -Iwinnt -Ilibseh -DHAVE_CONFIG_H -DHAVE_DIRENT_H -DWINNT -DMINGW -Wall -Wno-unused-value -mthreads -funsigned-char -O0 -ocond.o -c cond.c
gcc -I.. -I. -Iwinnt -Ilibseh -DHAVE_CONFIG_H -DHAVE_DIRENT_H -DWINNT -DMINGW -Wall -Wno-unused-value -mthreads -funsigned-char -O0 -oexec.o -c exec.c
exec.c: In function 'zexecve':
exec.c:251:6: warning: pointer targets in passing argument 2 of 'nt_read' differ in signedness
winnt/ntport.h:358:6: note: expected 'unsigned char *' but argument is of type 'char *'
exec.c: In function 'execpline':
exec.c:874:4: warning: pointer targets in passing argument 2 of 'nt_read' differ in signedness
winnt/ntport.h:358:6: note: expected 'unsigned char *' but argument is of type 'char *'
exec.c: In function 'execpline2':
exec.c:982:3: warning: pointer targets in passing argument 2 of 'nt_read' differ in signedness
winnt/ntport.h:358:6: note: expected 'unsigned char *' but argument is of type 'char *'
exec.c: In function 'closemn':
exec.c:1132:2: warning: pointer targets in passing argument 2 of 'nt_read' differ in signedness
winnt/ntport.h:358:6: note: expected 'unsigned char *' but argument is of type 'char *'
exec.c:1134:3: warning: pointer targets in passing argument 2 of 'nt_write' differ in signedness
winnt/ntport.h:361:6: note: expected 'unsigned char *' but argument is of type 'char *'
exec.c:1138:6: warning: pointer targets in passing argument 2 of 'nt_read' differ in signedness
winnt/ntport.h:358:6: note: expected 'unsigned char *' but argument is of type 'char *'
exec.c:1139:3: warning: pointer targets in passing argument 2 of 'nt_write' differ in signedness
winnt/ntport.h:361:6: note: expected 'unsigned char *' but argument is of type 'char *'
exec.c: In function 'execcmd':
exec.c:1617:6: warning: pointer targets in passing argument 2 of 'nt_read' differ in signedness
winnt/ntport.h:358:6: note: expected 'unsigned char *' but argument is of type 'char *'
exec.c: In function 'getherestr':
exec.c:2269:5: warning: pointer targets in passing argument 2 of 'nt_write' differ in signedness
winnt/ntport.h:361:6: note: expected 'unsigned char *' but argument is of type 'char *'
exec.c: In function 'getfpfunc':
exec.c:2940:3: warning: pointer targets in passing argument 2 of 'nt_read' differ in signedness
winnt/ntport.h:358:6: note: expected 'unsigned char *' but argument is of type 'char *'
...
...
gcc -I.. -I. -Iwinnt -Ilibseh -DHAVE_CONFIG_H -DHAVE_DIRENT_H -DWINNT -DMINGW -Wall -Wno-unused-value -mthreads -funsigned-char -O0 -oinit.o -c init.c
init.c: In function 'init_io':
init.c:363:33: warning: unused variable 'errbuf'
init.c:363:17: warning: unused variable 'outbuf'
init.c: In function 'init_shout':
init.c:505:17: warning: unused variable 'shoutbuf'
init.c: At top level:
init.c:526:8: warning: type defaults to 'int' in declaration of 'hasam'
gcc -I.. -I. -Iwinnt -Ilibseh -DHAVE_CONFIG_H -DHAVE_DIRENT_H -DWINNT -DMINGW -Wall -Wno-unused-value -mthreads -funsigned-char -O0 -oinput.o -c input.c
input.c: In function 'inputline':
input.c:224:6: warning: pointer targets in passing argument 2 of 'nt_write' differ in signedness
winnt/ntport.h:361:6: note: expected 'unsigned char *' but argument is of type 'char *'
...
...
gcc -I.. -I. -Iwinnt -Ilibseh -DHAVE_CONFIG_H -DHAVE_DIRENT_H -DWINNT -DMINGW -Wall -Wno-unused-value -mthreads -funsigned-char -O0 -omem.o -c mem.c
mem.c: In function 'halloc':
mem.c:278:2: warning: operation on 'queue_front' may be undefined
gcc -I.. -I. -Iwinnt -Ilibseh -DHAVE_CONFIG_H -DHAVE_DIRENT_H -DWINNT -DMINGW -Wall -Wno-unused-value -mthreads -funsigned-char -O0 -oparams.o -c params.c
params.c: In function 'zlevarsetfn':
params.c:1273:11: warning: comparison of distinct pointer types lacks a cast
params.c:1273:26: warning: comparison of distinct pointer types lacks a cast
params.c:1274:23: warning: comparison of distinct pointer types lacks a cast
...
...
gcc -I.. -I. -Iwinnt -Ilibseh -DHAVE_CONFIG_H -DHAVE_DIRENT_H -DWINNT -DMINGW -Wall -Wno-unused-value -mthreads -funsigned-char -O0 -outils.o -c utils.c
utils.c: In function 'finddir':
utils.c:465:19: warning: ignoring attributes applied to 'struct nameddir' after definition
utils.c: In function 'read1char':
utils.c:1377:5: warning: pointer targets in passing argument 2 of 'nt_read' differ in signedness
winnt/ntport.h:358:6: note: expected 'unsigned char *' but argument is of type 'char *'
utils.c: In function 'getquery':
utils.c:1420:6: warning: pointer targets in passing argument 2 of 'nt_write' differ in signedness
winnt/ntport.h:361:6: note: expected 'unsigned char *' but argument is of type 'char *'
utils.c:1425:6: warning: pointer targets in passing argument 2 of 'nt_write' differ in signedness
winnt/ntport.h:361:6: note: expected 'unsigned char *' but argument is of type 'char *'
utils.c:1426:2: warning: pointer targets in passing argument 2 of 'nt_write' differ in signedness
winnt/ntport.h:361:6: note: expected 'unsigned char *' but argument is of type 'char *'
utils.c:1434:6: warning: pointer targets in passing argument 2 of 'nt_write' differ in signedness
winnt/ntport.h:361:6: note: expected 'unsigned char *' but argument is of type 'char *'
...
...
gcc -I.. -I. -Iwinnt -Ilibseh -DHAVE_CONFIG_H -DHAVE_DIRENT_H -DWINNT -DMINGW -Wall -Wno-unused-value -mthreads -funsigned-char -O0 -ozle_main.o -c zle_main.c
zle_main.c: In function 'getkey':
zle_main.c:334:2: warning: pointer targets in passing argument 2 of 'nt_read' differ in signedness
winnt/ntport.h:358:6: note: expected 'unsigned char *' but argument is of type 'char *'
gcc -I.. -I. -Iwinnt -Ilibseh -DHAVE_CONFIG_H -DHAVE_DIRENT_H -DWINNT -DMINGW -Wall -Wno-unused-value -mthreads -funsigned-char -O0 -ozle_move.o -c zle_move.c
zle_move.c:33:8: warning: type defaults to 'int' in declaration of 'vimarkcs'
zle_move.c:33:22: warning: type defaults to 'int' in declaration of 'vimarkline'
...
...
gcc -I.. -I. -Iwinnt -Ilibseh -DHAVE_CONFIG_H -DHAVE_DIRENT_H -DWINNT -DMINGW -Wall -Wno-unused-value -mthreads -funsigned-char -O0 -ozle_tricky.o -c zle_tricky.c
zle_tricky.c:2173:7: warning: built-in function 'expl' declared as non-function
zle_tricky.c: In function 'listmatches':
zle_tricky.c:3725:5: warning: pointer targets in passing argument 1 of 'lstrlenA' differ in signedness
...
...
gcc -I.. -I. -Iwinnt -Ilibseh -DHAVE_CONFIG_H -DHAVE_DIRENT_H -DWINNT -DMINGW -Wall -Wno-unused-value -mthreads -funsigned-char -O0 -osupport.o -c winnt/support.c
winnt/support.c:504:27: warning: pointer targets in initialization differ in signedness
winnt/support.c: In function 'is_pathext':
winnt/support.c:511:2: warning: pointer targets in passing argument 2 of 'GetEnvironmentVariableA' differ in signedness
c:\mingw\bin\../lib/gcc/mingw32/4.5.0/../../../../include/winbase.h:1458:25: note: expected 'LPSTR' but argument is of type 'unsigned char *'
winnt/support.c:529:3: warning: pointer targets in passing argument 1 of 'strnicmp' differ in signedness
c:\mingw\bin\../lib/gcc/mingw32/4.5.0/../../../../include/string.h:103:37: note: expected 'const char *' but argument is of type 'unsigned char *'
...
...
gcc -I.. -I. -Iwinnt -Ilibseh -DHAVE_CONFIG_H -DHAVE_DIRENT_H -DWINNT -DMINGW -Wall -Wno-unused-value -mthreads -funsigned-char -O0 -otermcap.o -c winnt/termcap.c
winnt/termcap.c: In function 'memory_out':
winnt/termcap.c:56:3: warning: pointer targets in passing argument 2 of 'nt_write' differ in signedness
winnt/ntport.h:361:6: note: expected 'unsigned char *' but argument is of type 'char *'
winnt/termcap.c: In function 'gobble_line':
winnt/termcap.c:676:7: warning: pointer targets in passing argument 2 of 'nt_read' differ in signedness
winnt/ntport.h:358:6: note: expected 'unsigned char *' but argument is of type 'char *'
gcc -I.. -I. -Iwinnt -Ilibseh -DHAVE_CONFIG_H -DHAVE_DIRENT_H -DWINNT -DMINGW -Wall -Wno-unused-value -mthreads -funsigned-char -O0 -otparam.o -c winnt/tparam.c
winnt/tparam.c: In function 'memory_out':
winnt/tparam.c:33:3: warning: pointer targets in passing argument 2 of 'nt_write' differ in signedness
winnt/ntport.h:361:6: note: expected 'unsigned char *' but argument is of type 'char *'
...
...
gcc -I.. -I. -Iwinnt -Ilibseh -DHAVE_CONFIG_H -DHAVE_DIRENT_H -DWINNT -DMINGW -Wall -Wno-unused-value -mthreads -funsigned-char -O0 -otparse.o -c winnt/tparse.c
winnt/tparse.c: In function 'tc_putc':
winnt/tparse.c:117:4: warning: pointer targets in passing argument 2 of 'nt_write' differ in signedness
winnt/ntport.h:361:6: note: expected 'unsigned char *' but argument is of type 'char *'
winnt/tparse.c:173:4: warning: pointer targets in passing argument 2 of 'nt_write' differ in signedness
winnt/ntport.h:361:6: note: expected 'unsigned char *' but argument is of type 'char *'
--------------------

The resulting zsh.exe is not usable: neither HOME nor ZDOTDIR is defined
and the backspace doesn't work at all.

Regards,

--
Cesar

Discussion