On systems using unsigned char as default (char)EOF != EOF. Use int to store returned value of getopt to make it work on all platforms.
Signed-off-by: Michael Lass <[email protected]> --- tools/f2fstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/f2fstat.c b/tools/f2fstat.c index 8643797..7f485b0 100644 --- a/tools/f2fstat.c +++ b/tools/f2fstat.c @@ -191,7 +191,7 @@ void usage(void) void parse_option(int argc, char *argv[], struct options *opt) { - char option; + int option; const char *option_string = "d:i:p:h"; while ((option = getopt(argc, argv, option_string)) != EOF) { -- 2.3.1 ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
