Skip to content

Commit

Permalink
fix sign compareison warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mjfitzpatrick committed Jan 2, 2024
1 parent 2ef6081 commit 387c00a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion unix/boot/bootlib/osstrupk.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ os_strupk (
*/
if (maxch) {
if (sizeof(char) != sizeof(XCHAR) || str != (char *)outstr) {
n = min (n, strlen(ip));
n = min ((size_t)n, strlen(ip));
op[n] = XEOS;

while (--n >= 0)
Expand Down
3 changes: 2 additions & 1 deletion unix/boot/generic/mkpkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
# for portability reasons.

flex -o lexyy.c tok.l
$CC -c $HSI_CF generic.c lexyy.c yywrap.c
$CC -c $HSI_CF generic.c yywrap.c
$CC -c $HSI_CF -Wsign-compare lexyy.c
$CC $HSI_LF generic.o lexyy.o yywrap.o $HSI_LIBS -o generic.e

mv -f generic.e ../../hlib
Expand Down
4 changes: 2 additions & 2 deletions unix/boot/spp/xpp/mkpkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

find xpp.l -newer lexyy.c -exec rm lexyy.c \;
if test -f lexyy.c; then\
$CC -c $HSI_CF lexyy.c;\
$CC -c $HSI_CF -Wsign-compare lexyy.c;\
else\
lex -l xpp.l;\
sed -f lex.sed lex.yy.c > lexyy.c; rm lex.yy.c;\
$CC -c $HSI_CF lexyy.c;\
$CC -c $HSI_CF -Wsign-compare lexyy.c;\
fi

$CC -c $HSI_CF xppmain.c xppcode.c decl.c
Expand Down

0 comments on commit 387c00a

Please # to comment.