This is the mail archive of the cygwin-cvs@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[newlib-cygwin] Cygwin: utils: ps: use fputs to print fixed strings


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=423fc83dfd072ab11fadd8cd50b4189c2603670f

commit 423fc83dfd072ab11fadd8cd50b4189c2603670f
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Thu Aug 9 08:41:18 2018 +0200

    Cygwin: utils: ps: use fputs to print fixed strings
    
    Avoid gcc warning "format not a string literal and no format arguments"
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/utils/ps.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/winsup/utils/ps.cc b/winsup/utils/ps.cc
index be2ae60..ad46ab7 100644
--- a/winsup/utils/ps.cc
+++ b/winsup/utils/ps.cc
@@ -223,11 +223,11 @@ main (int argc, char *argv[])
       }
 
   if (sflag)
-    printf (dtitle);
+    fputs (dtitle, stdout);
   else if (fflag)
-    printf (ftitle);
+    fputs (ftitle, stdout);
   else if (lflag)
-    printf (ltitle);
+    fputs (ltitle, stdout);
 
   (void) cygwin_internal (CW_LOCK_PINFO, 1000);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]