diff options
author | Colin Watson <cjwatson@debian.org> | 2022-02-06 12:39:04 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2022-02-06 12:39:04 +0000 |
commit | 67c19a196af3abc42767dc9da079a89381e2542c (patch) | |
tree | d607293e75e02566fb8cc01d558c3d9a93f370e3 /src/man.c | |
parent | f4f94402834f20b9da730aeca5daa465be38efdf (diff) |
Suppress Clang warnings with -Wconstant-logical-operand
* src/lexgrog.l (find_name): Explicitly test `*PROG_COL != '\0'` rather
than just `*PROG_COL`, to pacify `clang -Wconstant-logical-operand`.
* src/man.c (make_roff_command, make_display_command): Likewise.
Diffstat (limited to 'src/man.c')
-rw-r--r-- | src/man.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1407,7 +1407,7 @@ static pipeline *make_roff_command (const char *dir, const char *file, break; } while (*pp_string++); - if (!troff && *PROG_COL) { + if (!troff && *PROG_COL != '\0') { const char *man_keep_formatting = getenv ("MAN_KEEP_FORMATTING"); if ((!man_keep_formatting || !*man_keep_formatting) && @@ -1416,7 +1416,7 @@ static pipeline *make_roff_command (const char *dir, const char *file, setenv ("GROFF_NO_SGR", "1", 1); #ifndef GNU_NROFF /* tbl needs col */ - else if (using_tbl && !troff && *PROG_COL) + else if (using_tbl && !troff && *PROG_COL != '\0') add_col (p, locale_charset, (void *) 0); #endif /* GNU_NROFF */ } @@ -1615,7 +1615,7 @@ static pipeline *make_display_command (const char *encoding, const char *title) if (!troff && (!want_encoding || !is_roff_device (want_encoding))) add_output_iconv (p, encoding, locale_charset); - if (!troff && *PROG_COL) { + if (!troff && *PROG_COL != '\0') { /* get rid of special characters if not writing to a * terminal */ |