From 54f44d5ac9e0b2a8dbf0feda2574635e962f5e93 Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Sun, 30 Jun 2024 09:25:31 -0700 Subject: [PATCH] Fix compiler warnings --- test/terminal.fl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/terminal.fl b/test/terminal.fl index 490fcf301..14aaa3ea7 100644 --- a/test/terminal.fl +++ b/test/terminal.fl @@ -368,7 +368,9 @@ return 1; // hit end of test, reset} {} Function {test_firstpage(bool reset)} { comment {--- 0000: Test unicode alignment} return_type {static int} } { - code {G_app->AppendTty( + code { +(void) reset; // unused arg: quiets compiler warnings +G_app->AppendTty( "\\033[0m\\033[H\\033[2J\\033[3J" // color/attr reset, home, cls, clear history "hello.\\nLine one\\nLine two\\n" "\\033[0;0;2m Dim text:\\033[31m red\\033[32m grn\\033[33m yel" @@ -1434,7 +1436,7 @@ G_tty->redraw();} {} } { code {unsigned long ival; if (sscanf(val_str, "\#%lx", &ival) == 1 ) { col = Fl_Color(ival); return 0; } -if (sscanf(val_str, "%ld", &ival) == 1 ) { col = Fl_Color(ival); return 0; } +if (sscanf(val_str, "%lu", &ival) == 1 ) { col = Fl_Color(ival); return 0; } fl_alert("Illegal color value '%s'\\n(can be e.g. '12' or '\#0c', etc)", val_str); return -1;} {}