From 4e03d6ca28fbb20aeba63977192c2b4fe11698a2 Mon Sep 17 00:00:00 2001 From: Harshal Sheth Date: Wed, 27 May 2020 01:39:44 -0400 Subject: [PATCH 1/2] Use format string to fix build --- output/terminal_noncurses.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/output/terminal_noncurses.c b/output/terminal_noncurses.c index e8147e0..0656e07 100644 --- a/output/terminal_noncurses.c +++ b/output/terminal_noncurses.c @@ -175,11 +175,11 @@ int draw_terminal_noncurses(int tty, int h, int w, int bars, int bar_width, int } if (current_char < 1) - cx += snprintf(ttyline_buffer + cx, ttybuf_length - cx, ttyspacestring); + cx += snprintf(ttyline_buffer + cx, ttybuf_length - cx, "%s", ttyspacestring); else if (current_char > 7) - cx += snprintf(ttyline_buffer + cx, ttybuf_length - cx, ttybarstring[0]); + cx += snprintf(ttyline_buffer + cx, ttybuf_length - cx, "%s", ttybarstring[0]); else - cx += snprintf(ttyline_buffer + cx, ttybuf_length - cx, + cx += snprintf(ttyline_buffer + cx, ttybuf_length - cx, "%s", ttybarstring[current_char]); cx += snprintf(ttyline_buffer + cx, ttybuf_length - cx, "\033[%dC", bs); From e8f9855339f94dba607439de078944d9a84d8433 Mon Sep 17 00:00:00 2001 From: Harshal Sheth Date: Wed, 27 May 2020 01:45:12 -0400 Subject: [PATCH 2/2] Fix clang format issues --- output/terminal_noncurses.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/output/terminal_noncurses.c b/output/terminal_noncurses.c index 0656e07..cd867e9 100644 --- a/output/terminal_noncurses.c +++ b/output/terminal_noncurses.c @@ -175,9 +175,11 @@ int draw_terminal_noncurses(int tty, int h, int w, int bars, int bar_width, int } if (current_char < 1) - cx += snprintf(ttyline_buffer + cx, ttybuf_length - cx, "%s", ttyspacestring); + cx += + snprintf(ttyline_buffer + cx, ttybuf_length - cx, "%s", ttyspacestring); else if (current_char > 7) - cx += snprintf(ttyline_buffer + cx, ttybuf_length - cx, "%s", ttybarstring[0]); + cx += snprintf(ttyline_buffer + cx, ttybuf_length - cx, "%s", + ttybarstring[0]); else cx += snprintf(ttyline_buffer + cx, ttybuf_length - cx, "%s", ttybarstring[current_char]);