fix string format specifiers

- fixed invalid, missing or additional arguments
- removed all type casts from arguments
- added missing (void*) typecasts for %p arguments
- use inttypes defines where appropriate
This commit is contained in:
Norbert Federa
2016-12-13 22:47:08 +01:00
parent 73ac495870
commit f71b6b46e8
310 changed files with 3187 additions and 3200 deletions

View File

@@ -83,7 +83,7 @@ static UINT echo_server_open_channel(echo_server* echo)
if (WaitForSingleObject(hEvent, 1000) == WAIT_FAILED)
{
Error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long)Error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", Error);
return Error;
}
@@ -121,12 +121,12 @@ static void* echo_server_thread_func(void* arg)
if ((error = echo_server_open_channel(echo)))
{
UINT error2 = 0;
WLog_ERR(TAG, "echo_server_open_channel failed with error %u!", error);
WLog_ERR(TAG, "echo_server_open_channel failed with error %"PRIu32"!", error);
IFCALLRET(echo->context.OpenResult, error2, &echo->context,
ECHO_SERVER_OPEN_RESULT_NOTSUPPORTED);
if (error2)
WLog_ERR(TAG, "echo server's OpenResult callback failed with error %u",
WLog_ERR(TAG, "echo server's OpenResult callback failed with error %"PRIu32"",
error2);
goto out;
@@ -158,7 +158,7 @@ static void* echo_server_thread_func(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u", error);
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %"PRIu32"", error);
break;
}
@@ -168,7 +168,7 @@ static void* echo_server_thread_func(void* arg)
ECHO_SERVER_OPEN_RESULT_CLOSED);
if (error)
WLog_ERR(TAG, "OpenResult failed with error %u!", error);
WLog_ERR(TAG, "OpenResult failed with error %"PRIu32"!", error);
break;
}
@@ -180,7 +180,7 @@ static void* echo_server_thread_func(void* arg)
ECHO_SERVER_OPEN_RESULT_ERROR);
if (error)
WLog_ERR(TAG, "OpenResult failed with error %u!", error);
WLog_ERR(TAG, "OpenResult failed with error %"PRIu32"!", error);
break;
}
@@ -194,7 +194,7 @@ static void* echo_server_thread_func(void* arg)
ECHO_SERVER_OPEN_RESULT_OK);
if (error)
WLog_ERR(TAG, "OpenResult failed with error %u!", error);
WLog_ERR(TAG, "OpenResult failed with error %"PRIu32"!", error);
break;
}
@@ -217,7 +217,7 @@ static void* echo_server_thread_func(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u", error);
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %"PRIu32"", error);
break;
}
@@ -250,7 +250,7 @@ static void* echo_server_thread_func(void* arg)
if (error)
{
WLog_ERR(TAG, "Response failed with error %u!", error);
WLog_ERR(TAG, "Response failed with error %"PRIu32"!", error);
break;
}
}
@@ -315,7 +315,7 @@ static UINT echo_server_close(echo_server_context* context)
if (WaitForSingleObject(echo->thread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"", error);
return error;
}