dbus-top: use mvwaddstr when no arguments are needed
Currently, some of the code uses mvwprintw to print a string without
using a format string, this causes the following errors:
error: format not a string literal and no format arguments
[-Werror=format-security]
The fix is to use mvwaddstr when no arguments are needed.
Signed-off-by: Sui Chen <suichen@google.com>
Change-Id: Ib17ad7a7795cb7bf77161f8730139f38216b7aba
diff --git a/dbus-top/menu.cpp b/dbus-top/menu.cpp
index af59f14..47d1f57 100644
--- a/dbus-top/menu.cpp
+++ b/dbus-top/menu.cpp
@@ -75,7 +75,7 @@
{
s.push_back(' ');
}
- mvwprintw(win_, y, x, s.c_str());
+ mvwaddstr(win_, y, x, s.c_str());
wattrset(win_, 0);
}
else
@@ -319,4 +319,4 @@
*ret = r;
}
return true;
-}
\ No newline at end of file
+}