Eliminate or disable all the warnings given by clang -Wall

This commit is contained in:
Stephen Heumann 2014-10-26 23:30:51 -05:00
parent 472db3bd56
commit a00ca4770f
4 changed files with 6 additions and 4 deletions

5
build
View File

@ -1,6 +1,7 @@
gcc -Wp,-MD,shell/.hush.o.d -std=gnu99 -Wall -o hush \
cc -std=c99 \
-Wall -Wno-format-security -Wno-comment -o hush \
-Iinclude -include include/autoconf.h \
-Dhush_main=main -D_GNU_SOURCE -DNDEBUG -D"BB_VER=KBUILD_STR(1.22.1)" -D"KBUILD_STR(s)=#s" \
-Dhush_main=main -DNDEBUG -D"BB_VER=KBUILD_STR(1.22.1)" -D"KBUILD_STR(s)=#s" \
shell/hush.c \
shell/match.c \
shell/math.c \

View File

@ -16,4 +16,5 @@
void FAST_FUNC bb_show_usage(void)
{
xfunc_die();
}

View File

@ -251,7 +251,7 @@ off_t FAST_FUNC xlseek(int fd, off_t offset, int whence)
off_t off = lseek(fd, offset, whence);
if (off == (off_t)-1) {
if (whence == SEEK_SET)
bb_perror_msg_and_die("lseek(%"OFF_FMT"u)", offset);
bb_perror_msg_and_die("lseek(%"PRIdMAX")", (intmax_t)offset);
bb_perror_msg_and_die("lseek");
}
return off;

View File

@ -5322,7 +5322,7 @@ static NOINLINE int expand_vars_to_list(o_string *output, int n, char *arg)
} else
/* If EXP_FLAG_SINGLEWORD, we handle assignment 'a=....$@.....'
* and in this case should treat it like '$*' - see 'else...' below */
if (first_ch == ('@'|0x80) /* quoted $@ */
if ((unsigned char)first_ch == ('@'|0x80) /* quoted $@ */
&& !(output->o_expflags & EXP_FLAG_SINGLEWORD) /* not v="$@" case */
) {
while (1) {