1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-12-21 00:26:27 -05:00

Fix new warnings in updated gcc

This commit is contained in:
Renaud 2017-05-06 08:51:02 +08:00
parent 99487b126f
commit 9d864d8b00
4 changed files with 19 additions and 19 deletions

View File

@ -33,7 +33,7 @@ CFLAGS=-O2 $(WARNINGS)
#CFLAGS=-O4 -DSVR4 # Sun #CFLAGS=-O4 -DSVR4 # Sun
#CFLAGS=-O -qchars=signed # RS/6000 #CFLAGS=-O -qchars=signed # RS/6000
ifeq ($(uname_S),Linux) ifeq ($(uname_S),Linux)
DEFINES=-DAUTOCONF -DPROGRAM=$(PROGRAM) -DPOSIX -DUSG -D_BSD_SOURCE -D_SVID_SOURCE -D_XOPEN_SOURCE=600 DEFINES=-DAUTOCONF -DPROGRAM=$(PROGRAM) -DPOSIX -DUSG
LIBS=-lcurses LIBS=-lcurses
endif endif
ifeq ($(uname_S),FreeBSD) ifeq ($(uname_S),FreeBSD)
@ -165,7 +165,8 @@ isearch.o: isearch.c isearch.h basic.h retcode.h buffer.h line.h utf8.h \
window.h window.h
line.o: line.c line.h retcode.h utf8.h buffer.h estruct.h mlout.h \ line.o: line.c line.h retcode.h utf8.h buffer.h estruct.h mlout.h \
window.h defines.h window.h defines.h
lock.o: lock.c estruct.h lock.h lock.o: lock.c estruct.h lock.h defines.h display.h utf8.h input.h bind.h \
retcode.h pklock.h
main.o: main.c estruct.h basic.h retcode.h bind.h bindable.h buffer.h \ main.o: main.c estruct.h basic.h retcode.h bind.h bindable.h buffer.h \
line.h utf8.h display.h eval.h execute.h file.h lock.h mlout.h random.h \ line.h utf8.h display.h eval.h execute.h file.h lock.h mlout.h random.h \
search.h terminal.h defines.h termio.h version.h window.h search.h terminal.h defines.h termio.h version.h window.h
@ -175,7 +176,7 @@ names.o: names.c names.h basic.h retcode.h bind.h bindable.h buffer.h \
line.h utf8.h display.h estruct.h eval.h exec.h file.h isearch.h \ line.h utf8.h display.h estruct.h eval.h exec.h file.h isearch.h \
region.h random.h search.h spawn.h window.h defines.h word.h region.h random.h search.h spawn.h window.h defines.h word.h
pklock.o: pklock.c estruct.h pklock.h pklock.o: pklock.c estruct.h pklock.h
posix.o: posix.c posix.o: posix.c termio.h utf8.h estruct.h retcode.h
random.o: random.c random.h retcode.h basic.h buffer.h line.h utf8.h \ random.o: random.c random.h retcode.h basic.h buffer.h line.h utf8.h \
display.h estruct.h execute.h input.h bind.h search.h terminal.h \ display.h estruct.h execute.h input.h bind.h search.h terminal.h \
defines.h window.h defines.h window.h
@ -188,7 +189,7 @@ spawn.o: spawn.c spawn.h defines.h buffer.h line.h retcode.h utf8.h \
window.h window.h
tcap.o: tcap.c terminal.h defines.h retcode.h utf8.h display.h estruct.h \ tcap.o: tcap.c terminal.h defines.h retcode.h utf8.h display.h estruct.h \
termio.h termio.h
termio.o: termio.c termio.h utf8.h estruct.h retcode.h termio.o: termio.c
utf8.o: utf8.c utf8.h utf8.o: utf8.c utf8.h
window.o: window.c window.h defines.h buffer.h line.h retcode.h utf8.h \ window.o: window.c window.h defines.h buffer.h line.h retcode.h utf8.h \
basic.h display.h estruct.h execute.h terminal.h wrapper.h basic.h display.h estruct.h execute.h terminal.h wrapper.h

10
bind.c
View File

@ -456,14 +456,14 @@ static unsigned int getckey( int mflag) {
* char *fname; name of startup file (null if default) * char *fname; name of startup file (null if default)
*/ */
int startup( const char *fname) { int startup( const char *fname) {
if( !fname || *fname == 0) /* use default if empty parameter */ if( !fname || *fname == 0) /* use default if empty parameter */
fname = rcfname ; fname = rcfname ;
fname = flook( fname, TRUE) ; /* look up the startup file */ fname = flook( fname, TRUE) ; /* look up the startup file */
if( fname == NULL) /* if it isn't around, don't sweat it */ if( fname == NULL) /* if it isn't around, don't sweat it */
return TRUE ; return TRUE ;
return dofile( fname) ; /* otherwise, execute the sucker */ return dofile( fname) ; /* otherwise, execute the sucker */
} }
/* /*

16
exec.c
View File

@ -131,10 +131,10 @@ int execcmd( int f, int n) {
execlevel = 0 ; execlevel = 0 ;
while( status == TRUE && n-- > 0) while( status == TRUE && n-- > 0)
status = docmd( cmdstr) ; status = docmd( cmdstr) ;
free( cmdstr) ; free( cmdstr) ;
return status ; return status ;
} }
/* /*
@ -302,10 +302,10 @@ static char *newtoken( char *src, char **tokref) {
if (*src) if (*src)
++src; ++src;
if( tok != NULL) if( tok != NULL)
tok[ idx] = 0 ; tok[ idx] = 0 ;
*tokref = tok ; *tokref = tok ;
return src; return src;
} }
@ -513,7 +513,7 @@ int execproc( int f, int n) {
while( status == TRUE && n-- > 0) while( status == TRUE && n-- > 0)
status = dobuf( bp) ; status = dobuf( bp) ;
return status ; return status ;
} }
#endif #endif
@ -981,7 +981,7 @@ int execfile( int f, int n) {
while( status == TRUE && n-- > 0) while( status == TRUE && n-- > 0)
status = dofile( fspec) ; status = dofile( fspec) ;
return status ; return status ;
} }
/* /*

View File

@ -84,8 +84,7 @@ char *dolock( const char *fname)
} }
if ((n = read(fd, locker, MAXNAME)) < 1) { if ((n = read(fd, locker, MAXNAME)) < 1) {
lseek(fd, 0, SEEK_SET); lseek(fd, 0, SEEK_SET);
/* strcpy(locker, getlogin()); */ strcpy( locker, getlogin()) ;
cuserid(locker);
strcat(locker + strlen(locker), "@"); strcat(locker + strlen(locker), "@");
gethostname(locker + strlen(locker), 64); gethostname(locker + strlen(locker), 64);
{ {