From: Paul Eggert Date: Mon, 1 Jun 2020 05:20:34 +0000 (-0700) Subject: echo: pacify Oracle Studio 12.6 X-Git-Tag: v9.0~240 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c229285ceb9a06d83571f411c5adb2fb27b34ebc;p=thirdparty%2Fcoreutils.git echo: pacify Oracle Studio 12.6 * src/echo.c (main): Don’t assign pointer to bool. This is well-defined in C99, but is arguably bad style and Oracle Studio 12.6 complains. --- diff --git a/src/echo.c b/src/echo.c index b5a6e966c4..e7f3447ee2 100644 --- a/src/echo.c +++ b/src/echo.c @@ -108,7 +108,7 @@ int main (int argc, char **argv) { bool display_return = true; - bool posixly_correct = getenv ("POSIXLY_CORRECT"); + bool posixly_correct = !!getenv ("POSIXLY_CORRECT"); bool allow_options = (! posixly_correct || (! DEFAULT_ECHO_TO_XPG && 1 < argc && STREQ (argv[1], "-n")));