From c229285ceb9a06d83571f411c5adb2fb27b34ebc Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 31 May 2020 22:20:34 -0700 Subject: [PATCH] echo: pacify Oracle Studio 12.6 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * 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. --- src/echo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"))); -- 2.47.2