diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2014-04-12 20:21:40 +0300 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2014-04-12 20:21:40 +0300 |
commit | bfc53136c8fbea59f116d8d0de92b2711f7804c0 (patch) | |
tree | d797fa25063570219b1efe6d2c5eecf6cabe5a34 /lib/draw | |
parent | d54381f00991669fa4ee4f3a8037f246ca1904f8 (diff) | |
download | bemenu-bfc53136c8fbea59f116d8d0de92b2711f7804c0.tar.gz bemenu-bfc53136c8fbea59f116d8d0de92b2711f7804c0.tar.bz2 bemenu-bfc53136c8fbea59f116d8d0de92b2711f7804c0.zip |
Add print attribute and fix warning it catched.
Diffstat (limited to 'lib/draw')
-rw-r--r-- | lib/draw/curses.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/draw/curses.c b/lib/draw/curses.c index 3b99cd9..656e47d 100644 --- a/lib/draw/curses.c +++ b/lib/draw/curses.c @@ -101,6 +101,9 @@ static int _bmDrawCursesResizeBuffer(char **buffer, size_t osize, size_t nsize) return 1; } +#if __GNUC__ +__attribute__((format(printf, 3, 4))) +#endif static void _bmDrawCursesDrawLine(int pair, int y, const char *format, ...) { static int blen = 0; @@ -178,8 +181,7 @@ static void _bmDrawCursesRender(const bmMenu *menu) const unsigned int lines = curses.getmaxy(curses.stdscr); curses.erase(); - size_t titleLen = (menu->title ? strlen(menu->title) + 1 : 0); - + int titleLen = (menu->title ? strlen(menu->title) + 1 : 0); _bmDrawCursesDrawLine(0, 0, "%*s%s", titleLen, "", menu->filter); if (menu->title) { |