From 1ac41cb08281bf5460dfea5fc40ff6f8e14873a1 Mon Sep 17 00:00:00 2001 From: Angelo Mantellini Date: Sun, 10 Feb 2019 13:34:22 +0100 Subject: [HICN-49] Remove warnings hicn-light on windows Change-Id: I106713c285ad5cc47cb5ae3aaf9c837685156e36 Signed-off-by: Angelo Mantellini --- hicn-light/src/command_line/daemon/hicnLightDaemon_main.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'hicn-light/src/command_line/daemon') diff --git a/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c b/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c index 533bb9cf0..dac8ee89f 100644 --- a/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c +++ b/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c @@ -37,7 +37,6 @@ #include static void _printRed(const char *output) { - #ifndef _WIN32 printf("\033[0;31m%s", output); #else @@ -45,21 +44,19 @@ static void _printRed(const char *output) { WORD currentConsoleAttr; CONSOLE_SCREEN_BUFFER_INFO csbi; if (GetConsoleScreenBufferInfo(hConsole, &csbi)) - currentConsoleAttr = csbi.wAttributes; + currentConsoleAttr = csbi.wAttributes; hConsole = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(hConsole, 4); printf("%s", output); SetConsoleTextAttribute(hConsole, currentConsoleAttr); #endif - } static void _printWhite(const char *output) { - #ifndef _WIN32 - printf("\033[0m%s", output); + printf("\033[0m%s", output); #else - HANDLE hConsole = NULL; + HANDLE hConsole = NULL; WORD currentConsoleAttr; CONSOLE_SCREEN_BUFFER_INFO csbi; if (GetConsoleScreenBufferInfo(hConsole, &csbi)) @@ -69,7 +66,6 @@ static void _printWhite(const char *output) { printf("%s", output); SetConsoleTextAttribute(hConsole, currentConsoleAttr); #endif - } static void _displayForwarderLogo(void) { @@ -81,7 +77,9 @@ static void _displayForwarderLogo(void) { _printWhite(" / _ \\ / // __// _ \\___/ // // _ `// _ \\/ __/\n"); _printRed("/_/ /____/(_)/_/ \\___/ "); _printWhite("/_//_//_/ \\__//_//_/ /_//_/ \\_, //_//_/\\__/\n"); - _printWhite(" /___/ \n"); + _printWhite( + " /___/ " + "\n"); printf("\n"); } -- cgit 1.2.3-korg