[Asterisk-code-review] menuselect/menuselect curses: Resolves sprintf usage error (asterisk[master])
George Joseph
asteriskteam at digium.com
Mon Jun 18 07:42:58 CDT 2018
George Joseph has posted comments on this change. ( https://gerrit.asterisk.org/9191 )
Change subject: menuselect/menuselect_curses: Resolves sprintf usage error
......................................................................
Patch Set 2: Code-Review-1
gcc version 7.3.1 20180303
gcc -g -D_GNU_SOURCE -Wall -c -o menuselect_curses.o menuselect_curses.c
menuselect_curses.c: In function ‘display_mem_info’:
menuselect_curses.c:230:33: warning: field width specifier ‘*’ expects argument of type ‘int’, but argument 3 has type ‘char *’ [-Wformat=]
sprintf(buf + strlen(buf), "%*.*s%s", buf, new_line ? 0 : 1, new_line ? 0 : 1, " ", word);
~^~~~ ~~~
menuselect_curses.c:230:36: warning: format ‘%s’ expects argument of type ‘char *’, but argument 5 has type ‘int’ [-Wformat=]
sprintf(buf + strlen(buf), "%*.*s%s", buf, new_line ? 0 : 1, new_line ? 0 : 1, " ", word);
~~~~^ ~~~~~~~~~~~~~~~~
%*.*d
menuselect_curses.c:230:31: warning: too many arguments for format [-Wformat-extra-args]
sprintf(buf + strlen(buf), "%*.*s%s", buf, new_line ? 0 : 1, new_line ? 0 : 1, " ", word);
^~~~~~~~~
--
To view, visit https://gerrit.asterisk.org/9191
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2213dcb454aff26457e2e4cc9c6821276463ae3a
Gerrit-Change-Number: 9191
Gerrit-PatchSet: 2
Gerrit-Owner: Matthew Fredrickson <creslin at digium.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Comment-Date: Mon, 18 Jun 2018 12:42:58 +0000
Gerrit-HasComments: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180618/0131f5c4/attachment-0001.html>
More information about the asterisk-code-review
mailing list