From 97779a8746dfa3b13439fc5b7a31e605669fff0b Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Mon, 24 Aug 2020 20:54:40 +0300 Subject: [PATCH] fix some C compiler warnings on windows --- fortune-mod/fortune/fortune.c | 4 ++-- fortune-mod/tests/t/lib/FortTestInst.pm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fortune-mod/fortune/fortune.c b/fortune-mod/fortune/fortune.c index c866afd..5edd57b 100644 --- a/fortune-mod/fortune/fortune.c +++ b/fortune-mod/fortune/fortune.c @@ -139,9 +139,9 @@ typedef struct fd struct fd *next, *prev; } FILEDESC; -static char *env_lang; +static const char *env_lang = NULL; -static bool Found_one; /* did we find a match? */ +static bool Found_one = false; /* did we find a match? */ static bool Find_files = false; /* just find a list of proper fortune files */ static bool Wait = false; /* wait desired after fortune */ static bool Short_only = false; /* short fortune desired */ diff --git a/fortune-mod/tests/t/lib/FortTestInst.pm b/fortune-mod/tests/t/lib/FortTestInst.pm index cd005b3..a607900 100644 --- a/fortune-mod/tests/t/lib/FortTestInst.pm +++ b/fortune-mod/tests/t/lib/FortTestInst.pm @@ -7,7 +7,7 @@ use Path::Tiny qw/ path tempdir tempfile cwd /; use File::Path qw/mkpath rmtree/; my $IS_WIN = ( $^O eq "MSWin32" ); -my $SEP = $IS_WIN ? "\\" : '/'; +my $SEP = $IS_WIN ? "\\" : '/'; my $MAKE = $IS_WIN ? 'gmake' : 'make'; sub do_system -- 2.40.0