From 4c651deadda4823fe9264f75a1eec4ef9b3a6ba1 Mon Sep 17 00:00:00 2001 From: Lightning11wins Date: Tue, 7 Apr 2026 14:03:12 -0600 Subject: [PATCH 1/8] Fix or ignore warnings in centrallix-lib with default configuration. Ignore uninitialized warnings in mtask that are intended behavior. Fix discards const warning in qpf_internal_hexdecode(). Clean up. --- centrallix-lib/src/mtask.c | 16 +++++++++++++++- centrallix-lib/src/qprintf.c | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/centrallix-lib/src/mtask.c b/centrallix-lib/src/mtask.c index 9a167d724..d857da0d1 100644 --- a/centrallix-lib/src/mtask.c +++ b/centrallix-lib/src/mtask.c @@ -694,7 +694,10 @@ int r_mtRun_PokeStack() { char buf[MT_MAX_STACK - MT_TASKSEP*2]; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wuninitialized" buf[0] = buf[0]; +#pragma GCC diagnostic pop return 0; } @@ -705,9 +708,15 @@ r_mtRun_Spacer() ** it needs to be in order for MTASK to work. DO NOT OPTIMIZE ** THIS MODULE!!!! The bogus assignment is added to keep gcc -Wall ** happy (and silent).... + ** + ** Edit (Israel): It wasn't very happy, so I added #pragma gcc directives + ** to silence this warning when compiling. **/ char buf[MT_TASKSEP]; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wuninitialized" buf[MT_TASKSEP-1] = buf[MT_TASKSEP-1]; +#pragma GCC diagnostic pop /*mprotect((char*)((int)(buf-MT_MAX_STACK+MT_TASKSEP*2+4095) & ~4095), MT_TASKSEP/2, PROT_NONE);*/ MTASK.CurrentThread->Stack = (unsigned char*)buf; @@ -730,9 +739,15 @@ r_mtRunStartFn() ** it needs to be in order for MTASK to work. DO NOT OPTIMIZE ** THIS MODULE!!!! The bogus assignment is added to keep gcc -Wall ** happy. + ** + ** Edit (Israel): It wasn't very happy, so I added #pragma gcc directives + ** to silence this warning when compiling. **/ char buf[MT_MAX_STACK]; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wuninitialized" buf[MT_MAX_STACK-1] = buf[MT_MAX_STACK-1]; +#pragma GCC diagnostic pop /*if (r_newidx < 0) return 0;*/ if (--r_newidx) r_mtRunStartFn(); @@ -4265,4 +4280,3 @@ syGetSem(pSemaphore sem, int cnt, int flags) return code; } - diff --git a/centrallix-lib/src/qprintf.c b/centrallix-lib/src/qprintf.c index 6827cc358..6e0570b1f 100644 --- a/centrallix-lib/src/qprintf.c +++ b/centrallix-lib/src/qprintf.c @@ -675,7 +675,7 @@ qpf_internal_hexdecode(pQPSession s, const char* src, size_t src_size, char** ds char* cursor; int ix; int req_size; - char* orig_src = src; + const char* orig_src = src; /** Required size **/ if (src_size%2 == 1) From 59ad81b6dd9ebf841d6a17c6cdf4af84c52d4fdb Mon Sep 17 00:00:00 2001 From: Lightning11wins Date: Tue, 7 Apr 2026 14:38:24 -0600 Subject: [PATCH 2/8] Fix about 304 warnings caused by tests using an unsigned char buffer for functions that expected chars with no cast. Clean up. --- centrallix-lib/tests/test_qprintf_00.c | 11 +++++------ centrallix-lib/tests/test_qprintf_01.c | 11 +++++------ centrallix-lib/tests/test_qprintf_02.c | 11 +++++------ centrallix-lib/tests/test_qprintf_03.c | 11 +++++------ centrallix-lib/tests/test_qprintf_04.c | 11 +++++------ centrallix-lib/tests/test_qprintf_05.c | 9 ++++----- centrallix-lib/tests/test_qprintf_06.c | 11 +++++------ centrallix-lib/tests/test_qprintf_07.c | 11 +++++------ centrallix-lib/tests/test_qprintf_08.c | 11 +++++------ centrallix-lib/tests/test_qprintf_09.c | 11 +++++------ centrallix-lib/tests/test_qprintf_10.c | 11 +++++------ centrallix-lib/tests/test_qprintf_11.c | 11 +++++------ centrallix-lib/tests/test_qprintf_12.c | 11 +++++------ centrallix-lib/tests/test_qprintf_13.c | 11 +++++------ centrallix-lib/tests/test_qprintf_14.c | 11 +++++------ centrallix-lib/tests/test_qprintf_15.c | 11 +++++------ centrallix-lib/tests/test_qprintf_16.c | 11 +++++------ centrallix-lib/tests/test_qprintf_17.c | 11 +++++------ centrallix-lib/tests/test_qprintf_18.c | 11 +++++------ centrallix-lib/tests/test_qprintf_19.c | 11 +++++------ centrallix-lib/tests/test_qprintf_20.c | 11 +++++------ centrallix-lib/tests/test_qprintf_21.c | 11 +++++------ centrallix-lib/tests/test_qprintf_22.c | 11 +++++------ centrallix-lib/tests/test_qprintf_23.c | 11 +++++------ centrallix-lib/tests/test_qprintf_24.c | 11 +++++------ centrallix-lib/tests/test_qprintf_25.c | 11 +++++------ centrallix-lib/tests/test_qprintf_26.c | 9 ++++----- centrallix-lib/tests/test_qprintf_27.c | 11 +++++------ centrallix-lib/tests/test_qprintf_28.c | 11 +++++------ centrallix-lib/tests/test_qprintf_29.c | 11 +++++------ centrallix-lib/tests/test_qprintf_30.c | 11 +++++------ centrallix-lib/tests/test_qprintf_31.c | 11 +++++------ centrallix-lib/tests/test_qprintf_32.c | 11 +++++------ centrallix-lib/tests/test_qprintf_33.c | 11 +++++------ centrallix-lib/tests/test_qprintf_34.c | 11 +++++------ centrallix-lib/tests/test_qprintf_35.c | 11 +++++------ centrallix-lib/tests/test_qprintf_36.c | 11 +++++------ centrallix-lib/tests/test_qprintf_37.c | 11 +++++------ centrallix-lib/tests/test_qprintf_38.c | 11 +++++------ centrallix-lib/tests/test_qprintf_39.c | 11 +++++------ centrallix-lib/tests/test_qprintf_40.c | 11 +++++------ centrallix-lib/tests/test_qprintf_41.c | 11 +++++------ centrallix-lib/tests/test_qprintf_42.c | 11 +++++------ centrallix-lib/tests/test_qprintf_43.c | 11 +++++------ centrallix-lib/tests/test_qprintf_44.c | 11 +++++------ centrallix-lib/tests/test_qprintf_45.c | 11 +++++------ centrallix-lib/tests/test_qprintf_46.c | 11 +++++------ centrallix-lib/tests/test_qprintf_47.c | 11 +++++------ centrallix-lib/tests/test_qprintf_48.c | 11 +++++------ centrallix-lib/tests/test_qprintf_49.c | 11 +++++------ centrallix-lib/tests/test_qprintf_50.c | 11 +++++------ centrallix-lib/tests/test_qprintf_51.c | 11 +++++------ centrallix-lib/tests/test_qprintf_52.c | 11 +++++------ centrallix-lib/tests/test_qprintf_53.c | 11 +++++------ centrallix-lib/tests/test_qprintf_54.c | 11 +++++------ centrallix-lib/tests/test_qprintf_55.c | 11 +++++------ centrallix-lib/tests/test_qprintf_56.c | 15 +++++++-------- centrallix-lib/tests/test_qprintf_57.c | 11 +++++------ centrallix-lib/tests/test_qprintf_58.c | 11 +++++------ centrallix-lib/tests/test_qprintf_59.c | 15 +++++++-------- centrallix-lib/tests/test_qprintf_60.c | 13 ++++++------- centrallix-lib/tests/test_qprintf_61.c | 17 ++++++++--------- centrallix-lib/tests/test_qprintf_62.c | 13 ++++++------- centrallix-lib/tests/test_qprintf_63.c | 5 ++--- centrallix-lib/tests/test_qprintf_64.c | 5 ++--- centrallix-lib/tests/test_qprintf_65.c | 5 ++--- centrallix-lib/tests/test_qprintf_66.c | 12 ++++++------ centrallix-lib/tests/test_qprintf_67.c | 19 +++++++++---------- centrallix-lib/tests/test_qprintf_68.c | 5 ++--- centrallix-lib/tests/test_strtcpy_00.c | 11 +++++------ centrallix-lib/tests/test_strtcpy_01.c | 19 +++++++++---------- centrallix-lib/tests/test_strtcpy_02.c | 11 +++++------ centrallix-lib/tests/test_strtcpy_03.c | 11 +++++------ centrallix-lib/tests/test_strtcpy_04.c | 11 +++++------ centrallix-lib/tests/test_strtcpy_05.c | 11 +++++------ centrallix-lib/tests/test_strtcpy_06.c | 9 ++++----- centrallix-lib/tests/test_strtcpy_07.c | 9 ++++----- centrallix-lib/tests/test_strtcpy_08.c | 9 ++++----- centrallix-lib/tests/test_strtcpy_09.c | 11 +++++------ centrallix-lib/tests/test_strtcpy_10.c | 11 +++++------ 80 files changed, 401 insertions(+), 480 deletions(-) diff --git a/centrallix-lib/tests/test_qprintf_00.c b/centrallix-lib/tests/test_qprintf_00.c index 939a6e9fb..f8ad85dbc 100644 --- a/centrallix-lib/tests/test_qprintf_00.c +++ b/centrallix-lib/tests/test_qprintf_00.c @@ -26,11 +26,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - snprintf(buf+4, 36, "this is a string non-overflow test."); - snprintf(buf+4, 36, "this is a string non-overflow test."); - snprintf(buf+4, 36, "this is a string non-overflow test."); - snprintf(buf+4, 36, "this is a string non-overflow test."); - assert(!strcmp(buf+4,"this is a string non-overflow test.")); + snprintf((char*)buf+4, 36, "this is a string non-overflow test."); + snprintf((char*)buf+4, 36, "this is a string non-overflow test."); + snprintf((char*)buf+4, 36, "this is a string non-overflow test."); + snprintf((char*)buf+4, 36, "this is a string non-overflow test."); + assert(!strcmp((char*)buf+4,"this is a string non-overflow test.")); assert(buf[43] == '\n'); assert(buf[42] == '\0'); assert(buf[41] == 0xff); @@ -44,4 +44,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_01.c b/centrallix-lib/tests/test_qprintf_01.c index d97e1aeed..e4299f241 100644 --- a/centrallix-lib/tests/test_qprintf_01.c +++ b/centrallix-lib/tests/test_qprintf_01.c @@ -26,11 +26,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "this is a string non-overflow test."); - qpfPrintf(NULL, buf+4, 36, "this is a string non-overflow test."); - qpfPrintf(NULL, buf+4, 36, "this is a string non-overflow test."); - qpfPrintf(NULL, buf+4, 36, "this is a string non-overflow test."); - assert(!strcmp(buf+4,"this is a string non-overflow test.")); + qpfPrintf(NULL, (char*)buf+4, 36, "this is a string non-overflow test."); + qpfPrintf(NULL, (char*)buf+4, 36, "this is a string non-overflow test."); + qpfPrintf(NULL, (char*)buf+4, 36, "this is a string non-overflow test."); + qpfPrintf(NULL, (char*)buf+4, 36, "this is a string non-overflow test."); + assert(!strcmp((char*)buf+4,"this is a string non-overflow test.")); assert(buf[43] == '\n'); assert(buf[42] == '\0'); assert(buf[41] == 0xff); @@ -44,4 +44,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_02.c b/centrallix-lib/tests/test_qprintf_02.c index 03408c99f..bb59c7792 100644 --- a/centrallix-lib/tests/test_qprintf_02.c +++ b/centrallix-lib/tests/test_qprintf_02.c @@ -26,11 +26,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "this is a string non-overflow test.... NOT!"); - qpfPrintf(NULL, buf+4, 36, "this is a string non-overflow test.... NOT!"); - qpfPrintf(NULL, buf+4, 36, "this is a string non-overflow test.... NOT!"); - qpfPrintf(NULL, buf+4, 36, "this is a string non-overflow test.... NOT!"); - assert(!strcmp(buf+4,"this is a string non-overflow test.")); + qpfPrintf(NULL, (char*)buf+4, 36, "this is a string non-overflow test.... NOT!"); + qpfPrintf(NULL, (char*)buf+4, 36, "this is a string non-overflow test.... NOT!"); + qpfPrintf(NULL, (char*)buf+4, 36, "this is a string non-overflow test.... NOT!"); + qpfPrintf(NULL, (char*)buf+4, 36, "this is a string non-overflow test.... NOT!"); + assert(!strcmp((char*)buf+4,"this is a string non-overflow test.")); assert(buf[43] == '\n'); assert(buf[42] == '\0'); assert(buf[41] == 0xff); @@ -44,4 +44,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_03.c b/centrallix-lib/tests/test_qprintf_03.c index dc6e5611b..e0660555e 100644 --- a/centrallix-lib/tests/test_qprintf_03.c +++ b/centrallix-lib/tests/test_qprintf_03.c @@ -26,11 +26,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "this is a string non-overflow test.?"); - qpfPrintf(NULL, buf+4, 36, "this is a string non-overflow test.?"); - qpfPrintf(NULL, buf+4, 36, "this is a string non-overflow test.?"); - qpfPrintf(NULL, buf+4, 36, "this is a string non-overflow test.?"); - assert(!strcmp(buf+4,"this is a string non-overflow test.")); + qpfPrintf(NULL, (char*)buf+4, 36, "this is a string non-overflow test.?"); + qpfPrintf(NULL, (char*)buf+4, 36, "this is a string non-overflow test.?"); + qpfPrintf(NULL, (char*)buf+4, 36, "this is a string non-overflow test.?"); + qpfPrintf(NULL, (char*)buf+4, 36, "this is a string non-overflow test.?"); + assert(!strcmp((char*)buf+4,"this is a string non-overflow test.")); assert(buf[43] == '\n'); assert(buf[42] == '\0'); assert(buf[41] == 0xff); @@ -44,4 +44,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_04.c b/centrallix-lib/tests/test_qprintf_04.c index 08ad5f8df..afba05ba8 100644 --- a/centrallix-lib/tests/test_qprintf_04.c +++ b/centrallix-lib/tests/test_qprintf_04.c @@ -27,11 +27,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, ""); - qpfPrintf(NULL, buf+4, 36, ""); - qpfPrintf(NULL, buf+4, 36, ""); - qpfPrintf(NULL, buf+4, 36, ""); - assert(!strcmp(buf+4,"")); + qpfPrintf(NULL, (char*)buf+4, 36, ""); + qpfPrintf(NULL, (char*)buf+4, 36, ""); + qpfPrintf(NULL, (char*)buf+4, 36, ""); + qpfPrintf(NULL, (char*)buf+4, 36, ""); + assert(!strcmp((char*)buf+4,"")); assert(buf[43] == '\n'); assert(buf[42] == '\0'); assert(buf[41] == 0xff); @@ -46,4 +46,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_05.c b/centrallix-lib/tests/test_qprintf_05.c index 66be194c3..809aa6637 100644 --- a/centrallix-lib/tests/test_qprintf_05.c +++ b/centrallix-lib/tests/test_qprintf_05.c @@ -28,10 +28,10 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 0, "this is a string overflow test."); - qpfPrintf(NULL, buf+4, 0, "this is a string overflow test."); - qpfPrintf(NULL, buf+4, 0, "this is a string overflow test."); - qpfPrintf(NULL, buf+4, 0, "this is a string overflow test."); + qpfPrintf(NULL, (char*)buf+4, 0, "this is a string overflow test."); + qpfPrintf(NULL, (char*)buf+4, 0, "this is a string overflow test."); + qpfPrintf(NULL, (char*)buf+4, 0, "this is a string overflow test."); + qpfPrintf(NULL, (char*)buf+4, 0, "this is a string overflow test."); assert(buf[43] == '\n'); assert(buf[42] == '\0'); assert(buf[41] == 0xff); @@ -47,4 +47,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_06.c b/centrallix-lib/tests/test_qprintf_06.c index ee23a414b..150c16128 100644 --- a/centrallix-lib/tests/test_qprintf_06.c +++ b/centrallix-lib/tests/test_qprintf_06.c @@ -28,11 +28,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 1, "this is a string overflow test."); - qpfPrintf(NULL, buf+4, 1, "this is a string overflow test."); - qpfPrintf(NULL, buf+4, 1, "this is a string overflow test."); - qpfPrintf(NULL, buf+4, 1, "this is a string overflow test."); - assert(!strcmp(buf+4, "")); + qpfPrintf(NULL, (char*)buf+4, 1, "this is a string overflow test."); + qpfPrintf(NULL, (char*)buf+4, 1, "this is a string overflow test."); + qpfPrintf(NULL, (char*)buf+4, 1, "this is a string overflow test."); + qpfPrintf(NULL, (char*)buf+4, 1, "this is a string overflow test."); + assert(!strcmp((char*)buf+4, "")); assert(buf[43] == '\n'); assert(buf[42] == '\0'); assert(buf[41] == 0xff); @@ -48,4 +48,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_07.c b/centrallix-lib/tests/test_qprintf_07.c index 8cceeb97c..6dbf0b302 100644 --- a/centrallix-lib/tests/test_qprintf_07.c +++ b/centrallix-lib/tests/test_qprintf_07.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "The word %STR is our data.", "STRING"); - qpfPrintf(NULL, buf+4, 36, "The word %STR is our data.", "STRING"); - qpfPrintf(NULL, buf+4, 36, "The word %STR is our data.", "STRING"); - rval = qpfPrintf(NULL, buf+4, 36, "The word %STR is our data.", "STRING"); - assert(!strcmp(buf+4, "The word STRING is our data.")); + qpfPrintf(NULL, (char*)buf+4, 36, "The word %STR is our data.", "STRING"); + qpfPrintf(NULL, (char*)buf+4, 36, "The word %STR is our data.", "STRING"); + qpfPrintf(NULL, (char*)buf+4, 36, "The word %STR is our data.", "STRING"); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "The word %STR is our data.", "STRING"); + assert(!strcmp((char*)buf+4, "The word STRING is our data.")); assert(rval == 28); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_08.c b/centrallix-lib/tests/test_qprintf_08.c index efb242665..cbaf8236f 100644 --- a/centrallix-lib/tests/test_qprintf_08.c +++ b/centrallix-lib/tests/test_qprintf_08.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "This is our data: %STR", "STRING"); - qpfPrintf(NULL, buf+4, 36, "This is our data: %STR", "STRING"); - qpfPrintf(NULL, buf+4, 36, "This is our data: %STR", "STRING"); - rval = qpfPrintf(NULL, buf+4, 36, "This is our data: %STR", "STRING"); - assert(!strcmp(buf+4, "This is our data: STRING")); + qpfPrintf(NULL, (char*)buf+4, 36, "This is our data: %STR", "STRING"); + qpfPrintf(NULL, (char*)buf+4, 36, "This is our data: %STR", "STRING"); + qpfPrintf(NULL, (char*)buf+4, 36, "This is our data: %STR", "STRING"); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "This is our data: %STR", "STRING"); + assert(!strcmp((char*)buf+4, "This is our data: STRING")); assert(rval == 24); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_09.c b/centrallix-lib/tests/test_qprintf_09.c index 303f23325..f217856c0 100644 --- a/centrallix-lib/tests/test_qprintf_09.c +++ b/centrallix-lib/tests/test_qprintf_09.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "%STR is our data today.", "STRING"); - qpfPrintf(NULL, buf+4, 36, "%STR is our data today.", "STRING"); - qpfPrintf(NULL, buf+4, 36, "%STR is our data today.", "STRING"); - rval = qpfPrintf(NULL, buf+4, 36, "%STR is our data today.", "STRING"); - assert(!strcmp(buf+4, "STRING is our data today.")); + qpfPrintf(NULL, (char*)buf+4, 36, "%STR is our data today.", "STRING"); + qpfPrintf(NULL, (char*)buf+4, 36, "%STR is our data today.", "STRING"); + qpfPrintf(NULL, (char*)buf+4, 36, "%STR is our data today.", "STRING"); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "%STR is our data today.", "STRING"); + assert(!strcmp((char*)buf+4, "STRING is our data today.")); assert(rval == 25); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_10.c b/centrallix-lib/tests/test_qprintf_10.c index 0a010f6e8..8651fc7cd 100644 --- a/centrallix-lib/tests/test_qprintf_10.c +++ b/centrallix-lib/tests/test_qprintf_10.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - snprintf(buf+4, 36, "The word %s is our data.", "STRING"); - snprintf(buf+4, 36, "The word %s is our data.", "STRING"); - snprintf(buf+4, 36, "The word %s is our data.", "STRING"); - rval = snprintf(buf+4, 36, "The word %s is our data.", "STRING"); - assert(!strcmp(buf+4,"The word STRING is our data.")); + snprintf((char*)buf+4, 36, "The word %s is our data.", "STRING"); + snprintf((char*)buf+4, 36, "The word %s is our data.", "STRING"); + snprintf((char*)buf+4, 36, "The word %s is our data.", "STRING"); + rval = snprintf((char*)buf+4, 36, "The word %s is our data.", "STRING"); + assert(!strcmp((char*)buf+4,"The word STRING is our data.")); assert(rval == 28); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_11.c b/centrallix-lib/tests/test_qprintf_11.c index fcec20d46..01e3f0b00 100644 --- a/centrallix-lib/tests/test_qprintf_11.c +++ b/centrallix-lib/tests/test_qprintf_11.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "The word %STR is our data... this is an overflow", "STRING"); - qpfPrintf(NULL, buf+4, 36, "The word %STR is our data... this is an overflow", "STRING"); - qpfPrintf(NULL, buf+4, 36, "The word %STR is our data... this is an overflow", "STRING"); - rval = qpfPrintf(NULL, buf+4, 36, "The word %STR is our data... this is an overflow", "STRING"); - assert(!strcmp(buf+4, "The word STRING is our data... this")); + qpfPrintf(NULL, (char*)buf+4, 36, "The word %STR is our data... this is an overflow", "STRING"); + qpfPrintf(NULL, (char*)buf+4, 36, "The word %STR is our data... this is an overflow", "STRING"); + qpfPrintf(NULL, (char*)buf+4, 36, "The word %STR is our data... this is an overflow", "STRING"); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "The word %STR is our data... this is an overflow", "STRING"); + assert(!strcmp((char*)buf+4, "The word STRING is our data... this")); assert(rval == 50); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_12.c b/centrallix-lib/tests/test_qprintf_12.c index db4be2ddc..8df3763b7 100644 --- a/centrallix-lib/tests/test_qprintf_12.c +++ b/centrallix-lib/tests/test_qprintf_12.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "The overflow this is data word %STR is our......", "STRING"); - qpfPrintf(NULL, buf+4, 36, "The overflow this is data word %STR is our......", "STRING"); - qpfPrintf(NULL, buf+4, 36, "The overflow this is data word %STR is our......", "STRING"); - rval = qpfPrintf(NULL, buf+4, 36, "The overflow this is data word %STR is our......", "STRING"); - assert(!strcmp(buf+4, "The overflow this is data word STRI")); + qpfPrintf(NULL, (char*)buf+4, 36, "The overflow this is data word %STR is our......", "STRING"); + qpfPrintf(NULL, (char*)buf+4, 36, "The overflow this is data word %STR is our......", "STRING"); + qpfPrintf(NULL, (char*)buf+4, 36, "The overflow this is data word %STR is our......", "STRING"); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "The overflow this is data word %STR is our......", "STRING"); + assert(!strcmp((char*)buf+4, "The overflow this is data word STRI")); assert(rval == 50); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_13.c b/centrallix-lib/tests/test_qprintf_13.c index d7f091a1a..218d23c06 100644 --- a/centrallix-lib/tests/test_qprintf_13.c +++ b/centrallix-lib/tests/test_qprintf_13.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "The overflow this is...... data word %STR is our", "STRING"); - qpfPrintf(NULL, buf+4, 36, "The overflow this is...... data word %STR is our", "STRING"); - qpfPrintf(NULL, buf+4, 36, "The overflow this is...... data word %STR is our", "STRING"); - rval = qpfPrintf(NULL, buf+4, 36, "The overflow this is...... data word %STR is our", "STRING"); - assert(!strcmp(buf+4, "The overflow this is...... data wor")); + qpfPrintf(NULL, (char*)buf+4, 36, "The overflow this is...... data word %STR is our", "STRING"); + qpfPrintf(NULL, (char*)buf+4, 36, "The overflow this is...... data word %STR is our", "STRING"); + qpfPrintf(NULL, (char*)buf+4, 36, "The overflow this is...... data word %STR is our", "STRING"); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "The overflow this is...... data word %STR is our", "STRING"); + assert(!strcmp((char*)buf+4, "The overflow this is...... data wor")); assert(rval == 50); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_14.c b/centrallix-lib/tests/test_qprintf_14.c index 4e973cf8b..2ba906042 100644 --- a/centrallix-lib/tests/test_qprintf_14.c +++ b/centrallix-lib/tests/test_qprintf_14.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "Here is the integer: %INT...", 12345); - qpfPrintf(NULL, buf+4, 36, "Here is the integer: %INT...", 12345); - qpfPrintf(NULL, buf+4, 36, "Here is the integer: %INT...", 12345); - rval = qpfPrintf(NULL, buf+4, 36, "Here is the integer: %INT...", 12345); - assert(!strcmp(buf+4, "Here is the integer: 12345...")); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the integer: %INT...", 12345); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the integer: %INT...", 12345); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the integer: %INT...", 12345); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "Here is the integer: %INT...", 12345); + assert(!strcmp((char*)buf+4, "Here is the integer: 12345...")); assert(rval == 29); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_15.c b/centrallix-lib/tests/test_qprintf_15.c index 49328270f..ecd55c896 100644 --- a/centrallix-lib/tests/test_qprintf_15.c +++ b/centrallix-lib/tests/test_qprintf_15.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "Here is the integer: %POS...", 12345); - qpfPrintf(NULL, buf+4, 36, "Here is the integer: %POS...", 12345); - qpfPrintf(NULL, buf+4, 36, "Here is the integer: %POS...", 12345); - rval = qpfPrintf(NULL, buf+4, 36, "Here is the integer: %POS...", 12345); - assert(!strcmp(buf+4, "Here is the integer: 12345...")); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the integer: %POS...", 12345); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the integer: %POS...", 12345); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the integer: %POS...", 12345); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "Here is the integer: %POS...", 12345); + assert(!strcmp((char*)buf+4, "Here is the integer: 12345...")); assert(rval == 29); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_16.c b/centrallix-lib/tests/test_qprintf_16.c index 8b596b621..84a5c1eda 100644 --- a/centrallix-lib/tests/test_qprintf_16.c +++ b/centrallix-lib/tests/test_qprintf_16.c @@ -26,11 +26,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "Here is the integer: %POS...", -12345); - qpfPrintf(NULL, buf+4, 36, "Here is the integer: %POS...", -12345); - qpfPrintf(NULL, buf+4, 36, "Here is the integer: %POS...", -12345); - rval = qpfPrintf(NULL, buf+4, 36, "Here is the integer: %POS...", -12345); - assert(strlen(buf+4) <= 30); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the integer: %POS...", -12345); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the integer: %POS...", -12345); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the integer: %POS...", -12345); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "Here is the integer: %POS...", -12345); + assert(strlen((char*)buf+4) <= 30); assert(rval == -EINVAL); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -44,4 +44,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_17.c b/centrallix-lib/tests/test_qprintf_17.c index ae2f71248..bbd470743 100644 --- a/centrallix-lib/tests/test_qprintf_17.c +++ b/centrallix-lib/tests/test_qprintf_17.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "Here is the string: %6STR...", "STRING"); - qpfPrintf(NULL, buf+4, 36, "Here is the string: %6STR...", "STRING"); - qpfPrintf(NULL, buf+4, 36, "Here is the string: %6STR...", "STRING"); - rval = qpfPrintf(NULL, buf+4, 36, "Here is the string: %6STR...", "STRING"); - assert(!strcmp(buf+4, "Here is the string: STRING...")); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the string: %6STR...", "STRING"); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the string: %6STR...", "STRING"); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the string: %6STR...", "STRING"); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "Here is the string: %6STR...", "STRING"); + assert(!strcmp((char*)buf+4, "Here is the string: STRING...")); assert(rval == 29); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_18.c b/centrallix-lib/tests/test_qprintf_18.c index 3011375e2..d42b970a5 100644 --- a/centrallix-lib/tests/test_qprintf_18.c +++ b/centrallix-lib/tests/test_qprintf_18.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "Here is the string: %8STR...", "STRINGSTR"); - qpfPrintf(NULL, buf+4, 36, "Here is the string: %8STR...", "STRINGSTR"); - qpfPrintf(NULL, buf+4, 36, "Here is the string: %8STR...", "STRINGSTR"); - rval = qpfPrintf(NULL, buf+4, 36, "Here is the string: %8STR...", "STRINGSTR"); - assert(!strcmp(buf+4, "Here is the string: STRINGST...")); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the string: %8STR...", "STRINGSTR"); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the string: %8STR...", "STRINGSTR"); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the string: %8STR...", "STRINGSTR"); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "Here is the string: %8STR...", "STRINGSTR"); + assert(!strcmp((char*)buf+4, "Here is the string: STRINGST...")); assert(rval == 31); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_19.c b/centrallix-lib/tests/test_qprintf_19.c index 00d26dbe6..028c622d1 100644 --- a/centrallix-lib/tests/test_qprintf_19.c +++ b/centrallix-lib/tests/test_qprintf_19.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "Here is the string: %*STR...", 8, "STRINGSTR"); - qpfPrintf(NULL, buf+4, 36, "Here is the string: %*STR...", 8, "STRINGSTR"); - qpfPrintf(NULL, buf+4, 36, "Here is the string: %*STR...", 8, "STRINGSTR"); - rval = qpfPrintf(NULL, buf+4, 36, "Here is the string: %*STR...", 8, "STRINGSTR"); - assert(!strcmp(buf+4, "Here is the string: STRINGST...")); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the string: %*STR...", 8, "STRINGSTR"); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the string: %*STR...", 8, "STRINGSTR"); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the string: %*STR...", 8, "STRINGSTR"); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "Here is the string: %*STR...", 8, "STRINGSTR"); + assert(!strcmp((char*)buf+4, "Here is the string: STRINGST...")); assert(rval == 31); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_20.c b/centrallix-lib/tests/test_qprintf_20.c index bb3ed05e4..72d44aa8b 100644 --- a/centrallix-lib/tests/test_qprintf_20.c +++ b/centrallix-lib/tests/test_qprintf_20.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "Here is the char: %CHR...", 'c'); - qpfPrintf(NULL, buf+4, 36, "Here is the char: %CHR...", 'c'); - qpfPrintf(NULL, buf+4, 36, "Here is the char: %CHR...", 'c'); - rval = qpfPrintf(NULL, buf+4, 36, "Here is the char: %CHR...", 'c'); - assert(!strcmp(buf+4, "Here is the char: c...")); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the char: %CHR...", 'c'); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the char: %CHR...", 'c'); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the char: %CHR...", 'c'); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "Here is the char: %CHR...", 'c'); + assert(!strcmp((char*)buf+4, "Here is the char: c...")); assert(rval == 22); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_21.c b/centrallix-lib/tests/test_qprintf_21.c index d559f7c58..62afbe8a3 100644 --- a/centrallix-lib/tests/test_qprintf_21.c +++ b/centrallix-lib/tests/test_qprintf_21.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "Here is the value: %DBL...", 3.14159); - qpfPrintf(NULL, buf+4, 36, "Here is the value: %DBL...", 3.14159); - qpfPrintf(NULL, buf+4, 36, "Here is the value: %DBL...", 3.14159); - rval = qpfPrintf(NULL, buf+4, 36, "Here is the value: %DBL...", 3.14159); - assert(!strcmp(buf+4, "Here is the value: 3.141590...")); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the value: %DBL...", 3.14159); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the value: %DBL...", 3.14159); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the value: %DBL...", 3.14159); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "Here is the value: %DBL...", 3.14159); + assert(!strcmp((char*)buf+4, "Here is the value: 3.141590...")); assert(rval == 30); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_22.c b/centrallix-lib/tests/test_qprintf_22.c index 9572ff44f..9c1d5fb2a 100644 --- a/centrallix-lib/tests/test_qprintf_22.c +++ b/centrallix-lib/tests/test_qprintf_22.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR&6LEN...", "STRINGSTR"); - qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR&6LEN...", "STRINGSTR"); - qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR&6LEN...", "STRINGSTR"); - rval = qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR&6LEN...", "STRINGSTR"); - assert(!strcmp(buf+4, "Here is the str: STRING...")); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR&6LEN...", "STRINGSTR"); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR&6LEN...", "STRINGSTR"); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR&6LEN...", "STRINGSTR"); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR&6LEN...", "STRINGSTR"); + assert(!strcmp((char*)buf+4, "Here is the str: STRING...")); assert(rval == 26); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_23.c b/centrallix-lib/tests/test_qprintf_23.c index 456b700c8..360f9fb98 100644 --- a/centrallix-lib/tests/test_qprintf_23.c +++ b/centrallix-lib/tests/test_qprintf_23.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR&6LEN...", "STR"); - qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR&6LEN...", "STR"); - qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR&6LEN...", "STR"); - rval = qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR&6LEN...", "STR"); - assert(!strcmp(buf+4, "Here is the str: STR...")); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR&6LEN...", "STR"); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR&6LEN...", "STR"); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR&6LEN...", "STR"); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR&6LEN...", "STR"); + assert(!strcmp((char*)buf+4, "Here is the str: STR...")); assert(rval == 23); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_24.c b/centrallix-lib/tests/test_qprintf_24.c index 1e4ab30ad..d93c4a9f7 100644 --- a/centrallix-lib/tests/test_qprintf_24.c +++ b/centrallix-lib/tests/test_qprintf_24.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR&*LEN...", 8, "STRING"); - qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR&*LEN...", 8, "STRING"); - qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR&*LEN...", 8, "STRING"); - rval = qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR&*LEN...", 8, "STRING"); - assert(!strcmp(buf+4, "Here is the str: STRING...")); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR&*LEN...", 8, "STRING"); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR&*LEN...", 8, "STRING"); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR&*LEN...", 8, "STRING"); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR&*LEN...", 8, "STRING"); + assert(!strcmp((char*)buf+4, "Here is the str: STRING...")); assert(rval == 26); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_25.c b/centrallix-lib/tests/test_qprintf_25.c index 140104c47..47534b791 100644 --- a/centrallix-lib/tests/test_qprintf_25.c +++ b/centrallix-lib/tests/test_qprintf_25.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR&SYM...", "identifier"); - qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR&SYM...", "identifier"); - qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR&SYM...", "identifier"); - rval = qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR&SYM...", "identifier"); - assert(!strcmp(buf+4, "Here is the str: identifier...")); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR&SYM...", "identifier"); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR&SYM...", "identifier"); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR&SYM...", "identifier"); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR&SYM...", "identifier"); + assert(!strcmp((char*)buf+4, "Here is the str: identifier...")); assert(rval == 30); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_26.c b/centrallix-lib/tests/test_qprintf_26.c index 265ae41ea..37a62fc4f 100644 --- a/centrallix-lib/tests/test_qprintf_26.c +++ b/centrallix-lib/tests/test_qprintf_26.c @@ -25,10 +25,10 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR&SYM...", "00identifier"); - qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR&SYM...", "00identifier"); - qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR&SYM...", "00identifier"); - rval = qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR&SYM...", "00identifier"); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR&SYM...", "00identifier"); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR&SYM...", "00identifier"); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR&SYM...", "00identifier"); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR&SYM...", "00identifier"); assert(rval < 0); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -42,4 +42,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_27.c b/centrallix-lib/tests/test_qprintf_27.c index df22c5cfd..7a81df39b 100644 --- a/centrallix-lib/tests/test_qprintf_27.c +++ b/centrallix-lib/tests/test_qprintf_27.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); - qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); - qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); - rval = qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); - assert(!strcmp(buf+4, "Here is the str: '\\\"ain\\'t\\\"'...")); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); + assert(!strcmp((char*)buf+4, "Here is the str: '\\\"ain\\'t\\\"'...")); assert(rval == 32); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_28.c b/centrallix-lib/tests/test_qprintf_28.c index 319576d5e..3b203d51e 100644 --- a/centrallix-lib/tests/test_qprintf_28.c +++ b/centrallix-lib/tests/test_qprintf_28.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); - qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); - qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); - rval = qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); - assert(!strcmp(buf+4, "Here is the str: '\\\"ain\\'t\\\"")); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); + assert(!strcmp((char*)buf+4, "Here is the str: '\\\"ain\\'t\\\"")); assert(rval == 39); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_29.c b/centrallix-lib/tests/test_qprintf_29.c index cf74cbcae..162233286 100644 --- a/centrallix-lib/tests/test_qprintf_29.c +++ b/centrallix-lib/tests/test_qprintf_29.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); - qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); - qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); - rval = qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); - assert(!strcmp(buf+4, "Here is the str: '\\\"ain\\'t")); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); + assert(!strcmp((char*)buf+4, "Here is the str: '\\\"ain\\'t")); assert(rval == 40); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_30.c b/centrallix-lib/tests/test_qprintf_30.c index 963092b18..efdbfce96 100644 --- a/centrallix-lib/tests/test_qprintf_30.c +++ b/centrallix-lib/tests/test_qprintf_30.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); - qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); - qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); - rval = qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); - assert(!strcmp(buf+4, "Here is the str: '\\\"ain\\'t")); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ'...", "\"ain't\""); + assert(!strcmp((char*)buf+4, "Here is the str: '\\\"ain\\'t")); assert(rval == 41); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_31.c b/centrallix-lib/tests/test_qprintf_31.c index fc8535fbe..cd03951b4 100644 --- a/centrallix-lib/tests/test_qprintf_31.c +++ b/centrallix-lib/tests/test_qprintf_31.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ&11LEN'...", "\"ain't\""); - qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ&11LEN'...", "\"ain't\""); - qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ&11LEN'...", "\"ain't\""); - rval = qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ&11LEN'...", "\"ain't\""); - assert(!strcmp(buf+4, "Here is the str: '\\\"ain\\'t\\\"'...")); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ&11LEN'...", "\"ain't\""); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ&11LEN'...", "\"ain't\""); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ&11LEN'...", "\"ain't\""); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ&11LEN'...", "\"ain't\""); + assert(!strcmp((char*)buf+4, "Here is the str: '\\\"ain\\'t\\\"'...")); assert(rval == 32); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_32.c b/centrallix-lib/tests/test_qprintf_32.c index 8781ab38a..356fb29fc 100644 --- a/centrallix-lib/tests/test_qprintf_32.c +++ b/centrallix-lib/tests/test_qprintf_32.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ&10LEN'...", "\"ain't\""); - qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ&10LEN'...", "\"ain't\""); - qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ&10LEN'...", "\"ain't\""); - rval = qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ&10LEN'...", "\"ain't\""); - assert(!strcmp(buf+4, "Here is the str: '\\\"ain\\'t\\\"'...")); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ&10LEN'...", "\"ain't\""); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ&10LEN'...", "\"ain't\""); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ&10LEN'...", "\"ain't\""); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ&10LEN'...", "\"ain't\""); + assert(!strcmp((char*)buf+4, "Here is the str: '\\\"ain\\'t\\\"'...")); assert(rval == 32); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_33.c b/centrallix-lib/tests/test_qprintf_33.c index 2c4714e59..39fe591be 100644 --- a/centrallix-lib/tests/test_qprintf_33.c +++ b/centrallix-lib/tests/test_qprintf_33.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ&9LEN'...", "\"ain't\""); - qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ&9LEN'...", "\"ain't\""); - qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ&9LEN'...", "\"ain't\""); - rval = qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ&9LEN'...", "\"ain't\""); - assert(!strcmp(buf+4, "Here is the str: '\\\"ain\\'t'...")); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ&9LEN'...", "\"ain't\""); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ&9LEN'...", "\"ain't\""); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ&9LEN'...", "\"ain't\""); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ&9LEN'...", "\"ain't\""); + assert(!strcmp((char*)buf+4, "Here is the str: '\\\"ain\\'t'...")); assert(rval == 30); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_34.c b/centrallix-lib/tests/test_qprintf_34.c index 468575cfa..60ca51cd9 100644 --- a/centrallix-lib/tests/test_qprintf_34.c +++ b/centrallix-lib/tests/test_qprintf_34.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ&8LEN'...", "\"ain't\""); - qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ&8LEN'...", "\"ain't\""); - qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ&8LEN'...", "\"ain't\""); - rval = qpfPrintf(NULL, buf+4, 36, "Here is the str: '%STR&ESCQ&8LEN'...", "\"ain't\""); - assert(!strcmp(buf+4, "Here is the str: '\\\"ain\\'t'...")); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ&8LEN'...", "\"ain't\""); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ&8LEN'...", "\"ain't\""); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ&8LEN'...", "\"ain't\""); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: '%STR&ESCQ&8LEN'...", "\"ain't\""); + assert(!strcmp((char*)buf+4, "Here is the str: '\\\"ain\\'t'...")); assert(rval == 30); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_35.c b/centrallix-lib/tests/test_qprintf_35.c index fe2c06d08..34d33b785 100644 --- a/centrallix-lib/tests/test_qprintf_35.c +++ b/centrallix-lib/tests/test_qprintf_35.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "HTML: '%STR&HTE'.", ""); - qpfPrintf(NULL, buf+4, 36, "HTML: '%STR&HTE'.", ""); - qpfPrintf(NULL, buf+4, 36, "HTML: '%STR&HTE'.", ""); - rval = qpfPrintf(NULL, buf+4, 36, "HTML: '%STR&HTE'.", ""); - assert(!strcmp(buf+4, "HTML: '<b c="w">'.")); + qpfPrintf(NULL, (char*)buf+4, 36, "HTML: '%STR&HTE'.", ""); + qpfPrintf(NULL, (char*)buf+4, 36, "HTML: '%STR&HTE'.", ""); + qpfPrintf(NULL, (char*)buf+4, 36, "HTML: '%STR&HTE'.", ""); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "HTML: '%STR&HTE'.", ""); + assert(!strcmp((char*)buf+4, "HTML: '<b c="w">'.")); assert(rval == 34); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_36.c b/centrallix-lib/tests/test_qprintf_36.c index 918605b62..cd41edc45 100644 --- a/centrallix-lib/tests/test_qprintf_36.c +++ b/centrallix-lib/tests/test_qprintf_36.c @@ -26,11 +26,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "The HTML: '%STR&HTE'.", ""); - qpfPrintf(NULL, buf+4, 36, "The HTML: '%STR&HTE'.", ""); - qpfPrintf(NULL, buf+4, 36, "The HTML: '%STR&HTE'.", ""); - rval = qpfPrintf(NULL, buf+4, 36, "The HTML: '%STR&HTE'.", ""); - assert(!strcmp(buf+4, "The HTML: '<b c="w"")); + qpfPrintf(NULL, (char*)buf+4, 36, "The HTML: '%STR&HTE'.", ""); + qpfPrintf(NULL, (char*)buf+4, 36, "The HTML: '%STR&HTE'.", ""); + qpfPrintf(NULL, (char*)buf+4, 36, "The HTML: '%STR&HTE'.", ""); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "The HTML: '%STR&HTE'.", ""); + assert(!strcmp((char*)buf+4, "The HTML: '<b c="w"")); assert(rval == 38); assert(buf[39] == '\n'); assert(buf[38] == '\0'); @@ -45,4 +45,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_37.c b/centrallix-lib/tests/test_qprintf_37.c index 9ed221c07..8dad336b2 100644 --- a/centrallix-lib/tests/test_qprintf_37.c +++ b/centrallix-lib/tests/test_qprintf_37.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "HTML: '%STR&HTE&26LEN'.", ""); - qpfPrintf(NULL, buf+4, 36, "HTML: '%STR&HTE&26LEN'.", ""); - qpfPrintf(NULL, buf+4, 36, "HTML: '%STR&HTE&26LEN'.", ""); - rval = qpfPrintf(NULL, buf+4, 36, "HTML: '%STR&HTE&26LEN'.", ""); - assert(!strcmp(buf+4, "HTML: '<b c="w">'.")); + qpfPrintf(NULL, (char*)buf+4, 36, "HTML: '%STR&HTE&26LEN'.", ""); + qpfPrintf(NULL, (char*)buf+4, 36, "HTML: '%STR&HTE&26LEN'.", ""); + qpfPrintf(NULL, (char*)buf+4, 36, "HTML: '%STR&HTE&26LEN'.", ""); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "HTML: '%STR&HTE&26LEN'.", ""); + assert(!strcmp((char*)buf+4, "HTML: '<b c="w">'.")); assert(rval == 34); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_38.c b/centrallix-lib/tests/test_qprintf_38.c index dcd9a679a..98815af42 100644 --- a/centrallix-lib/tests/test_qprintf_38.c +++ b/centrallix-lib/tests/test_qprintf_38.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "HTML: '%STR&HTE&25LEN'.", ""); - qpfPrintf(NULL, buf+4, 36, "HTML: '%STR&HTE&25LEN'.", ""); - qpfPrintf(NULL, buf+4, 36, "HTML: '%STR&HTE&25LEN'.", ""); - rval = qpfPrintf(NULL, buf+4, 36, "HTML: '%STR&HTE&25LEN'.", ""); - assert(!strcmp(buf+4, "HTML: '<b c="w">'.")); + qpfPrintf(NULL, (char*)buf+4, 36, "HTML: '%STR&HTE&25LEN'.", ""); + qpfPrintf(NULL, (char*)buf+4, 36, "HTML: '%STR&HTE&25LEN'.", ""); + qpfPrintf(NULL, (char*)buf+4, 36, "HTML: '%STR&HTE&25LEN'.", ""); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "HTML: '%STR&HTE&25LEN'.", ""); + assert(!strcmp((char*)buf+4, "HTML: '<b c="w">'.")); assert(rval == 34); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_39.c b/centrallix-lib/tests/test_qprintf_39.c index 796833f38..426b1f7af 100644 --- a/centrallix-lib/tests/test_qprintf_39.c +++ b/centrallix-lib/tests/test_qprintf_39.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "HTML: '%STR&HTE&24LEN'.", ""); - qpfPrintf(NULL, buf+4, 36, "HTML: '%STR&HTE&24LEN'.", ""); - qpfPrintf(NULL, buf+4, 36, "HTML: '%STR&HTE&24LEN'.", ""); - rval = qpfPrintf(NULL, buf+4, 36, "HTML: '%STR&HTE&24LEN'.", ""); - assert(!strcmp(buf+4, "HTML: '<b c="w"'.")); + qpfPrintf(NULL, (char*)buf+4, 36, "HTML: '%STR&HTE&24LEN'.", ""); + qpfPrintf(NULL, (char*)buf+4, 36, "HTML: '%STR&HTE&24LEN'.", ""); + qpfPrintf(NULL, (char*)buf+4, 36, "HTML: '%STR&HTE&24LEN'.", ""); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "HTML: '%STR&HTE&24LEN'.", ""); + assert(!strcmp((char*)buf+4, "HTML: '<b c="w"'.")); assert(rval == 30); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_40.c b/centrallix-lib/tests/test_qprintf_40.c index 8e5d47906..bbc67eab7 100644 --- a/centrallix-lib/tests/test_qprintf_40.c +++ b/centrallix-lib/tests/test_qprintf_40.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "HTML: '%STR&HTE&23LEN'.", ""); - qpfPrintf(NULL, buf+4, 36, "HTML: '%STR&HTE&23LEN'.", ""); - qpfPrintf(NULL, buf+4, 36, "HTML: '%STR&HTE&23LEN'.", ""); - rval = qpfPrintf(NULL, buf+4, 36, "HTML: '%STR&HTE&23LEN'.", ""); - assert(!strcmp(buf+4, "HTML: '<b c="w"'.")); + qpfPrintf(NULL, (char*)buf+4, 36, "HTML: '%STR&HTE&23LEN'.", ""); + qpfPrintf(NULL, (char*)buf+4, 36, "HTML: '%STR&HTE&23LEN'.", ""); + qpfPrintf(NULL, (char*)buf+4, 36, "HTML: '%STR&HTE&23LEN'.", ""); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "HTML: '%STR&HTE&23LEN'.", ""); + assert(!strcmp((char*)buf+4, "HTML: '<b c="w"'.")); assert(rval == 30); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_41.c b/centrallix-lib/tests/test_qprintf_41.c index 4725bad1a..4c127739d 100644 --- a/centrallix-lib/tests/test_qprintf_41.c +++ b/centrallix-lib/tests/test_qprintf_41.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "Encode: '%STR&HEX'.", ""); - qpfPrintf(NULL, buf+4, 36, "Encode: '%STR&HEX'.", ""); - qpfPrintf(NULL, buf+4, 36, "Encode: '%STR&HEX'.", ""); - rval = qpfPrintf(NULL, buf+4, 36, "Encode: '%STR&HEX'.", ""); - assert(!strcmp(buf+4, "Encode: '3c6220633d2277223e'.")); + qpfPrintf(NULL, (char*)buf+4, 36, "Encode: '%STR&HEX'.", ""); + qpfPrintf(NULL, (char*)buf+4, 36, "Encode: '%STR&HEX'.", ""); + qpfPrintf(NULL, (char*)buf+4, 36, "Encode: '%STR&HEX'.", ""); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "Encode: '%STR&HEX'.", ""); + assert(!strcmp((char*)buf+4, "Encode: '3c6220633d2277223e'.")); assert(rval == 29); assert(buf[36] == '\n'); assert(buf[35] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_42.c b/centrallix-lib/tests/test_qprintf_42.c index 8fd6528f5..eb8646f68 100644 --- a/centrallix-lib/tests/test_qprintf_42.c +++ b/centrallix-lib/tests/test_qprintf_42.c @@ -27,11 +27,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 26, "Encode: %STR&HEX", ""); - qpfPrintf(NULL, buf+4, 26, "Encode: %STR&HEX", ""); - qpfPrintf(NULL, buf+4, 26, "Encode: %STR&HEX", ""); - rval = qpfPrintf(NULL, buf+4, 26, "Encode: %STR&HEX", ""); - assert(!strcmp(buf+4, "Encode: 3c6220633d227722")); + qpfPrintf(NULL, (char*)buf+4, 26, "Encode: %STR&HEX", ""); + qpfPrintf(NULL, (char*)buf+4, 26, "Encode: %STR&HEX", ""); + qpfPrintf(NULL, (char*)buf+4, 26, "Encode: %STR&HEX", ""); + rval = qpfPrintf(NULL, (char*)buf+4, 26, "Encode: %STR&HEX", ""); + assert(!strcmp((char*)buf+4, "Encode: 3c6220633d227722")); assert(rval == 26); assert(buf[32] == '\n'); assert(buf[31] == '\0'); @@ -47,4 +47,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_43.c b/centrallix-lib/tests/test_qprintf_43.c index 5446ea559..a7a2f597a 100644 --- a/centrallix-lib/tests/test_qprintf_43.c +++ b/centrallix-lib/tests/test_qprintf_43.c @@ -27,11 +27,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 25, "Encode: %STR&HEX", ""); - qpfPrintf(NULL, buf+4, 25, "Encode: %STR&HEX", ""); - qpfPrintf(NULL, buf+4, 25, "Encode: %STR&HEX", ""); - rval = qpfPrintf(NULL, buf+4, 25, "Encode: %STR&HEX", ""); - assert(!strcmp(buf+4, "Encode: 3c6220633d227722")); + qpfPrintf(NULL, (char*)buf+4, 25, "Encode: %STR&HEX", ""); + qpfPrintf(NULL, (char*)buf+4, 25, "Encode: %STR&HEX", ""); + qpfPrintf(NULL, (char*)buf+4, 25, "Encode: %STR&HEX", ""); + rval = qpfPrintf(NULL, (char*)buf+4, 25, "Encode: %STR&HEX", ""); + assert(!strcmp((char*)buf+4, "Encode: 3c6220633d227722")); assert(rval == 26); assert(buf[32] == '\n'); assert(buf[31] == '\0'); @@ -47,4 +47,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_44.c b/centrallix-lib/tests/test_qprintf_44.c index e5170f58e..4288ae108 100644 --- a/centrallix-lib/tests/test_qprintf_44.c +++ b/centrallix-lib/tests/test_qprintf_44.c @@ -27,11 +27,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 26, "Enc: %STR&HEX...", ""); - qpfPrintf(NULL, buf+4, 26, "Enc: %STR&HEX...", ""); - qpfPrintf(NULL, buf+4, 26, "Enc: %STR&HEX...", ""); - rval = qpfPrintf(NULL, buf+4, 26, "Enc: %STR&HEX...", ""); - assert(!strcmp(buf+4, "Enc: 3c6220633d2277223e..")); + qpfPrintf(NULL, (char*)buf+4, 26, "Enc: %STR&HEX...", ""); + qpfPrintf(NULL, (char*)buf+4, 26, "Enc: %STR&HEX...", ""); + qpfPrintf(NULL, (char*)buf+4, 26, "Enc: %STR&HEX...", ""); + rval = qpfPrintf(NULL, (char*)buf+4, 26, "Enc: %STR&HEX...", ""); + assert(!strcmp((char*)buf+4, "Enc: 3c6220633d2277223e..")); assert(rval == 26); assert(buf[32] == '\n'); assert(buf[31] == '\0'); @@ -47,4 +47,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_45.c b/centrallix-lib/tests/test_qprintf_45.c index f9ee5fa85..8f53f8c32 100644 --- a/centrallix-lib/tests/test_qprintf_45.c +++ b/centrallix-lib/tests/test_qprintf_45.c @@ -27,11 +27,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 27, "Enc: %STR&HEX&18LEN...", ""); - qpfPrintf(NULL, buf+4, 27, "Enc: %STR&HEX&18LEN...", ""); - qpfPrintf(NULL, buf+4, 27, "Enc: %STR&HEX&18LEN...", ""); - rval = qpfPrintf(NULL, buf+4, 27, "Enc: %STR&HEX&18LEN...", ""); - assert(!strcmp(buf+4, "Enc: 3c6220633d2277223e...")); + qpfPrintf(NULL, (char*)buf+4, 27, "Enc: %STR&HEX&18LEN...", ""); + qpfPrintf(NULL, (char*)buf+4, 27, "Enc: %STR&HEX&18LEN...", ""); + qpfPrintf(NULL, (char*)buf+4, 27, "Enc: %STR&HEX&18LEN...", ""); + rval = qpfPrintf(NULL, (char*)buf+4, 27, "Enc: %STR&HEX&18LEN...", ""); + assert(!strcmp((char*)buf+4, "Enc: 3c6220633d2277223e...")); assert(rval == 26); assert(buf[33] == '\n'); assert(buf[32] == '\0'); @@ -47,4 +47,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_46.c b/centrallix-lib/tests/test_qprintf_46.c index 4d4739ca6..eade4eb5f 100644 --- a/centrallix-lib/tests/test_qprintf_46.c +++ b/centrallix-lib/tests/test_qprintf_46.c @@ -27,11 +27,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 27, "Enc: %STR&HEX&17LEN...", ""); - qpfPrintf(NULL, buf+4, 27, "Enc: %STR&HEX&17LEN...", ""); - qpfPrintf(NULL, buf+4, 27, "Enc: %STR&HEX&17LEN...", ""); - rval = qpfPrintf(NULL, buf+4, 27, "Enc: %STR&HEX&17LEN...", ""); - assert(!strcmp(buf+4, "Enc: 3c6220633d227722...")); + qpfPrintf(NULL, (char*)buf+4, 27, "Enc: %STR&HEX&17LEN...", ""); + qpfPrintf(NULL, (char*)buf+4, 27, "Enc: %STR&HEX&17LEN...", ""); + qpfPrintf(NULL, (char*)buf+4, 27, "Enc: %STR&HEX&17LEN...", ""); + rval = qpfPrintf(NULL, (char*)buf+4, 27, "Enc: %STR&HEX&17LEN...", ""); + assert(!strcmp((char*)buf+4, "Enc: 3c6220633d227722...")); assert(rval == 24); assert(buf[31] == '\n'); assert(buf[30] == '\0'); @@ -47,4 +47,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_47.c b/centrallix-lib/tests/test_qprintf_47.c index 21e4b5278..714aac51b 100644 --- a/centrallix-lib/tests/test_qprintf_47.c +++ b/centrallix-lib/tests/test_qprintf_47.c @@ -27,11 +27,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 27, "Enc: %STR&HEX&16LEN...", ""); - qpfPrintf(NULL, buf+4, 27, "Enc: %STR&HEX&16LEN...", ""); - qpfPrintf(NULL, buf+4, 27, "Enc: %STR&HEX&16LEN...", ""); - rval = qpfPrintf(NULL, buf+4, 27, "Enc: %STR&HEX&16LEN...", ""); - assert(!strcmp(buf+4, "Enc: 3c6220633d227722...")); + qpfPrintf(NULL, (char*)buf+4, 27, "Enc: %STR&HEX&16LEN...", ""); + qpfPrintf(NULL, (char*)buf+4, 27, "Enc: %STR&HEX&16LEN...", ""); + qpfPrintf(NULL, (char*)buf+4, 27, "Enc: %STR&HEX&16LEN...", ""); + rval = qpfPrintf(NULL, (char*)buf+4, 27, "Enc: %STR&HEX&16LEN...", ""); + assert(!strcmp((char*)buf+4, "Enc: 3c6220633d227722...")); assert(rval == 24); assert(buf[31] == '\n'); assert(buf[30] == '\0'); @@ -47,4 +47,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_48.c b/centrallix-lib/tests/test_qprintf_48.c index 93c55728a..ba83728d5 100644 --- a/centrallix-lib/tests/test_qprintf_48.c +++ b/centrallix-lib/tests/test_qprintf_48.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR"...", "\"ain't\""); - qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR"...", "\"ain't\""); - qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR"...", "\"ain't\""); - rval = qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR"...", "\"ain't\""); - assert(!strcmp(buf+4, "Here is the str: '\\\"ain\\'t\\\"'...")); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR"...", "\"ain't\""); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR"...", "\"ain't\""); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR"...", "\"ain't\""); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR"...", "\"ain't\""); + assert(!strcmp((char*)buf+4, "Here is the str: '\\\"ain\\'t\\\"'...")); assert(rval == 32); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_49.c b/centrallix-lib/tests/test_qprintf_49.c index b368f01ba..106ecdbf6 100644 --- a/centrallix-lib/tests/test_qprintf_49.c +++ b/centrallix-lib/tests/test_qprintf_49.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR&DQUOT...", "\"ain't\""); - qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR&DQUOT...", "\"ain't\""); - qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR&DQUOT...", "\"ain't\""); - rval = qpfPrintf(NULL, buf+4, 36, "Here is the str: %STR&DQUOT...", "\"ain't\""); - assert(!strcmp(buf+4, "Here is the str: \"\\\"ain\\'t\\\"\"...")); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR&DQUOT...", "\"ain't\""); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR&DQUOT...", "\"ain't\""); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR&DQUOT...", "\"ain't\""); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "Here is the str: %STR&DQUOT...", "\"ain't\""); + assert(!strcmp((char*)buf+4, "Here is the str: \"\\\"ain\\'t\\\"\"...")); assert(rval == 32); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_50.c b/centrallix-lib/tests/test_qprintf_50.c index 104d82396..ae75e075d 100644 --- a/centrallix-lib/tests/test_qprintf_50.c +++ b/centrallix-lib/tests/test_qprintf_50.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 33, "Here is the str...: %STR"", "\"ain't\""); - qpfPrintf(NULL, buf+4, 33, "Here is the str...: %STR"", "\"ain't\""); - qpfPrintf(NULL, buf+4, 33, "Here is the str...: %STR"", "\"ain't\""); - rval = qpfPrintf(NULL, buf+4, 33, "Here is the str...: %STR"", "\"ain't\""); - assert(!strcmp(buf+4, "Here is the str...: '\\\"ain\\'t\\\"'")); + qpfPrintf(NULL, (char*)buf+4, 33, "Here is the str...: %STR"", "\"ain't\""); + qpfPrintf(NULL, (char*)buf+4, 33, "Here is the str...: %STR"", "\"ain't\""); + qpfPrintf(NULL, (char*)buf+4, 33, "Here is the str...: %STR"", "\"ain't\""); + rval = qpfPrintf(NULL, (char*)buf+4, 33, "Here is the str...: %STR"", "\"ain't\""); + assert(!strcmp((char*)buf+4, "Here is the str...: '\\\"ain\\'t\\\"'")); assert(rval == 32); assert(buf[39] == '\n'); assert(buf[38] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_51.c b/centrallix-lib/tests/test_qprintf_51.c index 936417dd4..0b8225f97 100644 --- a/centrallix-lib/tests/test_qprintf_51.c +++ b/centrallix-lib/tests/test_qprintf_51.c @@ -27,11 +27,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 32, "Here is the str...: %STR"", "\"ain't\""); - qpfPrintf(NULL, buf+4, 32, "Here is the str...: %STR"", "\"ain't\""); - qpfPrintf(NULL, buf+4, 32, "Here is the str...: %STR"", "\"ain't\""); - rval = qpfPrintf(NULL, buf+4, 32, "Here is the str...: %STR"", "\"ain't\""); - assert(!strcmp(buf+4, "Here is the str...: '\\\"ain\\'t'")); + qpfPrintf(NULL, (char*)buf+4, 32, "Here is the str...: %STR"", "\"ain't\""); + qpfPrintf(NULL, (char*)buf+4, 32, "Here is the str...: %STR"", "\"ain't\""); + qpfPrintf(NULL, (char*)buf+4, 32, "Here is the str...: %STR"", "\"ain't\""); + rval = qpfPrintf(NULL, (char*)buf+4, 32, "Here is the str...: %STR"", "\"ain't\""); + assert(!strcmp((char*)buf+4, "Here is the str...: '\\\"ain\\'t'")); assert(rval == 32); assert(buf[39] == '\n'); assert(buf[38] == '\0'); @@ -47,4 +47,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_52.c b/centrallix-lib/tests/test_qprintf_52.c index 16cbbd6bc..a933a30e0 100644 --- a/centrallix-lib/tests/test_qprintf_52.c +++ b/centrallix-lib/tests/test_qprintf_52.c @@ -27,11 +27,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 31, "Here is the str...: %STR"", "\"ain't\""); - qpfPrintf(NULL, buf+4, 31, "Here is the str...: %STR"", "\"ain't\""); - qpfPrintf(NULL, buf+4, 31, "Here is the str...: %STR"", "\"ain't\""); - rval = qpfPrintf(NULL, buf+4, 31, "Here is the str...: %STR"", "\"ain't\""); - assert(!strcmp(buf+4, "Here is the str...: '\\\"ain\\'t'")); + qpfPrintf(NULL, (char*)buf+4, 31, "Here is the str...: %STR"", "\"ain't\""); + qpfPrintf(NULL, (char*)buf+4, 31, "Here is the str...: %STR"", "\"ain't\""); + qpfPrintf(NULL, (char*)buf+4, 31, "Here is the str...: %STR"", "\"ain't\""); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "Here is the str...: %STR"", "\"ain't\""); + assert(!strcmp((char*)buf+4, "Here is the str...: '\\\"ain\\'t'")); assert(rval == 32); assert(buf[39] == '\n'); assert(buf[38] == '\0'); @@ -47,4 +47,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_53.c b/centrallix-lib/tests/test_qprintf_53.c index d94c0b110..ec2a4dedb 100644 --- a/centrallix-lib/tests/test_qprintf_53.c +++ b/centrallix-lib/tests/test_qprintf_53.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 35, "Here is the str: %STR&HTE ", ""); - qpfPrintf(NULL, buf+4, 35, "Here is the str: %STR&HTE ", ""); - qpfPrintf(NULL, buf+4, 35, "Here is the str: %STR&HTE ", ""); - rval = qpfPrintf(NULL, buf+4, 35, "Here is the str: %STR&HTE ", ""); - assert(!strcmp(buf+4, "Here is the str: <tag> ")); + qpfPrintf(NULL, (char*)buf+4, 35, "Here is the str: %STR&HTE ", ""); + qpfPrintf(NULL, (char*)buf+4, 35, "Here is the str: %STR&HTE ", ""); + qpfPrintf(NULL, (char*)buf+4, 35, "Here is the str: %STR&HTE ", ""); + rval = qpfPrintf(NULL, (char*)buf+4, 35, "Here is the str: %STR&HTE ", ""); + assert(!strcmp((char*)buf+4, "Here is the str: <tag> ")); assert(rval == 34); assert(buf[41] == '\n'); assert(buf[40] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_54.c b/centrallix-lib/tests/test_qprintf_54.c index 3e6cc7e79..1b9ebd1f1 100644 --- a/centrallix-lib/tests/test_qprintf_54.c +++ b/centrallix-lib/tests/test_qprintf_54.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 31, "Conditional: yes=%[yes%STR%] no=%[no%STR%]%STR", 1, "!YES!", 0, "!NO!", "."); - qpfPrintf(NULL, buf+4, 31, "Conditional: yes=%[yes%STR%] no=%[no%STR%]%STR", 1, "!YES!", 0, "!NO!", "."); - qpfPrintf(NULL, buf+4, 31, "Conditional: yes=%[yes%STR%] no=%[no%STR%]%STR", 1, "!YES!", 0, "!NO!", "."); - rval = qpfPrintf(NULL, buf+4, 31, "Conditional: yes=%[yes%STR%] no=%[no%STR%]%STR", 1, "!YES!", 0, "!NO!", "."); - assert(!strcmp(buf+4, "Conditional: yes=yes!YES! no=.")); + qpfPrintf(NULL, (char*)buf+4, 31, "Conditional: yes=%[yes%STR%] no=%[no%STR%]%STR", 1, "!YES!", 0, "!NO!", "."); + qpfPrintf(NULL, (char*)buf+4, 31, "Conditional: yes=%[yes%STR%] no=%[no%STR%]%STR", 1, "!YES!", 0, "!NO!", "."); + qpfPrintf(NULL, (char*)buf+4, 31, "Conditional: yes=%[yes%STR%] no=%[no%STR%]%STR", 1, "!YES!", 0, "!NO!", "."); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "Conditional: yes=%[yes%STR%] no=%[no%STR%]%STR", 1, "!YES!", 0, "!NO!", "."); + assert(!strcmp((char*)buf+4, "Conditional: yes=yes!YES! no=.")); assert(rval == 30); assert(buf[38] == '\n'); assert(buf[37] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_55.c b/centrallix-lib/tests/test_qprintf_55.c index f2ccfb69f..ac5d7da8d 100644 --- a/centrallix-lib/tests/test_qprintf_55.c +++ b/centrallix-lib/tests/test_qprintf_55.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 31, "/path/to/%STR&FILE/file", "myfilename.sbd"); - qpfPrintf(NULL, buf+4, 31, "/path/to/%STR&FILE/file", "myfilename.sbd"); - qpfPrintf(NULL, buf+4, 31, "/path/to/%STR&FILE/file", "myfilename.sbd"); - rval = qpfPrintf(NULL, buf+4, 31, "/path/to/%STR&FILE/file", "myfilename.sbd"); - assert(!strcmp(buf+4, "/path/to/myfilename.sbd/file")); + qpfPrintf(NULL, (char*)buf+4, 31, "/path/to/%STR&FILE/file", "myfilename.sbd"); + qpfPrintf(NULL, (char*)buf+4, 31, "/path/to/%STR&FILE/file", "myfilename.sbd"); + qpfPrintf(NULL, (char*)buf+4, 31, "/path/to/%STR&FILE/file", "myfilename.sbd"); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/to/%STR&FILE/file", "myfilename.sbd"); + assert(!strcmp((char*)buf+4, "/path/to/myfilename.sbd/file")); assert(rval == 28); assert(buf[35] == '\n'); assert(buf[34] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_56.c b/centrallix-lib/tests/test_qprintf_56.c index 581d945f0..1826588c1 100644 --- a/centrallix-lib/tests/test_qprintf_56.c +++ b/centrallix-lib/tests/test_qprintf_56.c @@ -25,19 +25,19 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - rval = qpfPrintf(NULL, buf+4, 31, "/path/to/%STR&FILE/file", ".."); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/to/%STR&FILE/file", ".."); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 31, "/path/to/%STR&FILE/file", "../otherdir"); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/to/%STR&FILE/file", "../otherdir"); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 31, "/path/to/%STR&FILE/file", "dir/.."); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/to/%STR&FILE/file", "dir/.."); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 31, "/path/to/%STR&FILE/file", "file/subfile"); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/to/%STR&FILE/file", "file/subfile"); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 31, "/path/to/%STR&FILE/file", "a/../b"); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/to/%STR&FILE/file", "a/../b"); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 31, "/path/to/%STR&FILE/file", "."); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/to/%STR&FILE/file", "."); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 31, "/path/to/%STR&FILE/file", ""); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/to/%STR&FILE/file", ""); assert(rval < 0); assert(buf[35] == '\n'); assert(buf[34] == '\0'); @@ -51,4 +51,3 @@ test(char** tname) return iter*7; } - diff --git a/centrallix-lib/tests/test_qprintf_57.c b/centrallix-lib/tests/test_qprintf_57.c index bf57ff87b..d95fe460e 100644 --- a/centrallix-lib/tests/test_qprintf_57.c +++ b/centrallix-lib/tests/test_qprintf_57.c @@ -25,15 +25,15 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - rval = qpfPrintf(NULL, buf+4, 31, "/path/to/%8STR&FILE/file", "file\0ame"); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/to/%8STR&FILE/file", "file\0ame"); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 31, "/path/to/%8STR&FILE/file", "filenam\0"); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/to/%8STR&FILE/file", "filenam\0"); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 31, "/path/to/%8STR&FILE/file", "\0ilename"); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/to/%8STR&FILE/file", "\0ilename"); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 31, "/path/to/%2STR&FILE/file", "..."); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/to/%2STR&FILE/file", "..."); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 31, "/path/to/%8STR&FILE/file", "filename"); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/to/%8STR&FILE/file", "filename"); assert(rval == 22); assert(buf[35] == '\n'); assert(buf[34] == '\0'); @@ -47,4 +47,3 @@ test(char** tname) return iter*5; } - diff --git a/centrallix-lib/tests/test_qprintf_58.c b/centrallix-lib/tests/test_qprintf_58.c index 5200ba118..25430ef27 100644 --- a/centrallix-lib/tests/test_qprintf_58.c +++ b/centrallix-lib/tests/test_qprintf_58.c @@ -25,11 +25,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - qpfPrintf(NULL, buf+4, 31, "/path/%STR&PATH/name", "one/two"); - qpfPrintf(NULL, buf+4, 31, "/path/%STR&PATH/name", "one/two"); - qpfPrintf(NULL, buf+4, 31, "/path/%STR&PATH/name", "one/two"); - rval = qpfPrintf(NULL, buf+4, 31, "/path/%STR&PATH/name", "one/two"); - assert(strcmp(buf+4,"/path/one/two/name") == 0); + qpfPrintf(NULL, (char*)buf+4, 31, "/path/%STR&PATH/name", "one/two"); + qpfPrintf(NULL, (char*)buf+4, 31, "/path/%STR&PATH/name", "one/two"); + qpfPrintf(NULL, (char*)buf+4, 31, "/path/%STR&PATH/name", "one/two"); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/%STR&PATH/name", "one/two"); + assert(strcmp((char*)buf+4,"/path/one/two/name") == 0); assert(rval == 18); assert(buf[25] == '\n'); assert(buf[24] == '\0'); @@ -43,4 +43,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_qprintf_59.c b/centrallix-lib/tests/test_qprintf_59.c index b0a3c02ab..818260ba3 100644 --- a/centrallix-lib/tests/test_qprintf_59.c +++ b/centrallix-lib/tests/test_qprintf_59.c @@ -25,19 +25,19 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - rval = qpfPrintf(NULL, buf+4, 31, "/path/%STR&PATH/name", "one/../two"); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/%STR&PATH/name", "one/../two"); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 31, "/path/%STR&PATH/name", ".."); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/%STR&PATH/name", ".."); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 31, "/path/%STR&PATH/name", "../one"); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/%STR&PATH/name", "../one"); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 31, "/path/%STR&PATH/name", "one/.."); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/%STR&PATH/name", "one/.."); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 31, "/path/%STR&PATH/name", "/.."); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/%STR&PATH/name", "/.."); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 31, "/path/%STR&PATH/name", "../"); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/%STR&PATH/name", "../"); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 31, "/path/%STR&PATH/name", "/../"); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/%STR&PATH/name", "/../"); assert(rval < 0); assert(buf[25] == '\n'); assert(buf[24] == '\0'); @@ -51,4 +51,3 @@ test(char** tname) return iter*7; } - diff --git a/centrallix-lib/tests/test_qprintf_60.c b/centrallix-lib/tests/test_qprintf_60.c index 392007145..08ef696af 100644 --- a/centrallix-lib/tests/test_qprintf_60.c +++ b/centrallix-lib/tests/test_qprintf_60.c @@ -25,16 +25,16 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - rval = qpfPrintf(NULL, buf+4, 31, "/path/%8STR&PATH/name", "file/..\0"); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/%8STR&PATH/name", "file/..\0"); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 31, "/path/%8STR&PATH/name", "one/t/.\0"); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/%8STR&PATH/name", "one/t/.\0"); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 31, "/path/%8STR&PATH/name", "one/t/.."); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/%8STR&PATH/name", "one/t/.."); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 31, "/path/%8STR&PATH/name", "one/t/..."); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/%8STR&PATH/name", "one/t/..."); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 31, "/path/%8STR&PATH/name", "one/two/"); - assert(strcmp(buf+4,"/path/one/two//name") == 0); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/%8STR&PATH/name", "one/two/"); + assert(strcmp((char*)buf+4,"/path/one/two//name") == 0); assert(rval == 19); assert(buf[26] == '\n'); assert(buf[25] == '\0'); @@ -48,4 +48,3 @@ test(char** tname) return iter*5; } - diff --git a/centrallix-lib/tests/test_qprintf_61.c b/centrallix-lib/tests/test_qprintf_61.c index b20a78656..f8b29e8b9 100644 --- a/centrallix-lib/tests/test_qprintf_61.c +++ b/centrallix-lib/tests/test_qprintf_61.c @@ -25,19 +25,19 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - rval = qpfPrintf(NULL, buf+4, 31, "/path/%STR&PATH&8LEN/name", "file/..\0"); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/%STR&PATH&8LEN/name", "file/..\0"); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 31, "/path/%STR&PATH&8LEN/name", "files/../"); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/%STR&PATH&8LEN/name", "files/../"); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 31, "/path/%STR&PATH&8LEN/name", "one/t/.."); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/%STR&PATH&8LEN/name", "one/t/.."); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 31, "/path/%STR&PATH&8LEN/name", "one/t/..."); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/%STR&PATH&8LEN/name", "one/t/..."); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 31, "/path/%STR&PATH&8LEN/name", "one/two/"); - assert(strcmp(buf+4,"/path/one/two//name") == 0); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/%STR&PATH&8LEN/name", "one/two/"); + assert(strcmp((char*)buf+4,"/path/one/two//name") == 0); assert(rval == 19); - rval = qpfPrintf(NULL, buf+4, 31, "/path/%STR&PATH&8LEN/name", "one/two//"); - assert(strcmp(buf+4,"/path/one/two//name") == 0); + rval = qpfPrintf(NULL, (char*)buf+4, 31, "/path/%STR&PATH&8LEN/name", "one/two//"); + assert(strcmp((char*)buf+4,"/path/one/two//name") == 0); assert(rval == 19); assert(buf[26] == '\n'); assert(buf[25] == '\0'); @@ -51,4 +51,3 @@ test(char** tname) return iter*6; } - diff --git a/centrallix-lib/tests/test_qprintf_62.c b/centrallix-lib/tests/test_qprintf_62.c index f3903297f..7433cd264 100644 --- a/centrallix-lib/tests/test_qprintf_62.c +++ b/centrallix-lib/tests/test_qprintf_62.c @@ -25,16 +25,16 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - rval = qpfPrintf(NULL, buf+4, 36, "%STR&DB64", "dGVzdC#BkYXRh"); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "%STR&DB64", "dGVzdC#BkYXRh"); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 36, "%STR&DB64", "#dGVzdCBkYXRh"); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "%STR&DB64", "#dGVzdCBkYXRh"); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 36, "%STR&DB64", "dGVzdCBkYXRh#"); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "%STR&DB64", "dGVzdCBkYXRh#"); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 36, "%STR&DB64", "dGVzdCBkY#XRh"); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "%STR&DB64", "dGVzdCBkY#XRh"); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 36, "%STR&DB64", "dGVzdCBkYXRh"); - assert(strcmp(buf+4,"test data") == 0); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "%STR&DB64", "dGVzdCBkYXRh"); + assert(strcmp((char*)buf+4,"test data") == 0); assert(rval == 9); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -48,4 +48,3 @@ test(char** tname) return iter*6; } - diff --git a/centrallix-lib/tests/test_qprintf_63.c b/centrallix-lib/tests/test_qprintf_63.c index d860d8b42..f3db7fbaf 100644 --- a/centrallix-lib/tests/test_qprintf_63.c +++ b/centrallix-lib/tests/test_qprintf_63.c @@ -25,9 +25,9 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - rval = qpfPrintf(NULL, buf+4, 36, "%STR&DB64", "dGVzdCBkYXRh"); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "%STR&DB64", "dGVzdCBkYXRh"); assert(rval == 9); - rval = qpfPrintf(NULL, buf+4, 36, "%STR&DB64", "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5eg"); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "%STR&DB64", "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5eg"); assert(rval < 0); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -41,4 +41,3 @@ test(char** tname) return iter*2; } - diff --git a/centrallix-lib/tests/test_qprintf_64.c b/centrallix-lib/tests/test_qprintf_64.c index 7c6cea8a9..42d670239 100644 --- a/centrallix-lib/tests/test_qprintf_64.c +++ b/centrallix-lib/tests/test_qprintf_64.c @@ -25,9 +25,9 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - rval = qpfPrintf(NULL, (char*)(buf+4), 36, "%STR&B64", "test data"); + rval = qpfPrintf(NULL, (char*)((char*)buf+4), 36, "%STR&B64", "test data"); assert(rval == strlen("dGVzdCBkYXRh")); - assert(strcmp(buf+4, "dGVzdCBkYXRh") == 0); + assert(strcmp((char*)buf+4, "dGVzdCBkYXRh") == 0); assert(buf[43] == '\n'); assert(buf[42] == '\0'); assert(buf[41] == 0xff); @@ -40,4 +40,3 @@ test(char** tname) return iter; } - diff --git a/centrallix-lib/tests/test_qprintf_65.c b/centrallix-lib/tests/test_qprintf_65.c index 6d8dd5409..ae66dc73f 100644 --- a/centrallix-lib/tests/test_qprintf_65.c +++ b/centrallix-lib/tests/test_qprintf_65.c @@ -25,9 +25,9 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - rval = qpfPrintf(NULL, (char*)(buf+4), 36, "%STR&B64", "test data"); + rval = qpfPrintf(NULL, (char*)((char*)buf+4), 36, "%STR&B64", "test data"); assert(rval == strlen("dGVzdCBkYXRh")); - rval = qpfPrintf(NULL, (char*)(buf+4), 36, "%STR&B64", "the quick brown fox jumps ov"); + rval = qpfPrintf(NULL, (char*)((char*)buf+4), 36, "%STR&B64", "the quick brown fox jumps ov"); assert(rval < 0); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -41,4 +41,3 @@ test(char** tname) return iter*2; } - diff --git a/centrallix-lib/tests/test_qprintf_66.c b/centrallix-lib/tests/test_qprintf_66.c index b2659dc79..48e1157f8 100644 --- a/centrallix-lib/tests/test_qprintf_66.c +++ b/centrallix-lib/tests/test_qprintf_66.c @@ -30,12 +30,12 @@ test(char** tname) //Test value > INT_MAX long long testNum = 2200000000ll; - qpfPrintf(NULL, buf + 4, 36, "Here is the ll: %LL...", testNum); - qpfPrintf(NULL, buf+4, 36, "Here is the ll: %LL...", testNum); - qpfPrintf(NULL, buf+4, 36, "Here is the ll: %LL...", testNum); - rval = qpfPrintf(NULL, buf+4, 36, "Here is the ll: %LL...", testNum); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the ll: %LL...", testNum); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the ll: %LL...", testNum); + qpfPrintf(NULL, (char*)buf+4, 36, "Here is the ll: %LL...", testNum); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "Here is the ll: %LL...", testNum); - assert(!strcmp(buf+4, "Here is the ll: 2200000000...")); + assert(!strcmp((char*)buf+4, "Here is the ll: 2200000000...")); //For the long long case, rval will be set to the return value of snprintf, i.e. length of string assert(rval == 29); assert(buf[34] == 0xff); @@ -50,4 +50,4 @@ test(char** tname) } return iter*4; -} \ No newline at end of file +} diff --git a/centrallix-lib/tests/test_qprintf_67.c b/centrallix-lib/tests/test_qprintf_67.c index 46100b3c0..38fd50235 100644 --- a/centrallix-lib/tests/test_qprintf_67.c +++ b/centrallix-lib/tests/test_qprintf_67.c @@ -25,21 +25,21 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - rval = qpfPrintf(NULL, buf+4, 36, "%STR&DHEX", "4142434D4E4F#"); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "%STR&DHEX", "4142434D4E4F#"); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 36, "%STR&DHEX", "414243#4D4E4F"); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "%STR&DHEX", "414243#4D4E4F"); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 36, "%STR&DHEX", "41424#34D4E4F"); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "%STR&DHEX", "41424#34D4E4F"); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 36, "%STR&DHEX", "#4142434D4E4F"); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "%STR&DHEX", "#4142434D4E4F"); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 36, "%STR&DHEX", "4142434D4E4"); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "%STR&DHEX", "4142434D4E4"); assert(rval < 0); - rval = qpfPrintf(NULL, buf+4, 36, "%STR&DHEX", "4142434D4E4F"); - assert(strcmp(buf+4,"ABCMNO") == 0); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "%STR&DHEX", "4142434D4E4F"); + assert(strcmp((char*)buf+4,"ABCMNO") == 0); assert(rval == 6); - rval = qpfPrintf(NULL, buf+4, 36, "%STR&DHEX", "4142434d4e4f"); - assert(strcmp(buf+4,"ABCMNO") == 0); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "%STR&DHEX", "4142434d4e4f"); + assert(strcmp((char*)buf+4,"ABCMNO") == 0); assert(rval == 6); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -53,4 +53,3 @@ test(char** tname) return iter*7; } - diff --git a/centrallix-lib/tests/test_qprintf_68.c b/centrallix-lib/tests/test_qprintf_68.c index b6b7cd573..16c770ae4 100644 --- a/centrallix-lib/tests/test_qprintf_68.c +++ b/centrallix-lib/tests/test_qprintf_68.c @@ -25,9 +25,9 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - rval = qpfPrintf(NULL, buf+4, 36, "%STR&DHEX", "414243444546"); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "%STR&DHEX", "414243444546"); assert(rval == 6); - rval = qpfPrintf(NULL, buf+4, 36, "%STR&DHEX", "4142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F60616263646566676869"); + rval = qpfPrintf(NULL, (char*)buf+4, 36, "%STR&DHEX", "4142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F60616263646566676869"); assert(rval < 0); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -41,4 +41,3 @@ test(char** tname) return iter*2; } - diff --git a/centrallix-lib/tests/test_strtcpy_00.c b/centrallix-lib/tests/test_strtcpy_00.c index fc919b180..090c57d94 100644 --- a/centrallix-lib/tests/test_strtcpy_00.c +++ b/centrallix-lib/tests/test_strtcpy_00.c @@ -26,11 +26,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - strcpy(buf+4, "this is a string non-overflow test."); - strcpy(buf+4, "this is a string non-overflow test."); - strcpy(buf+4, "this is a string non-overflow test."); - strcpy(buf+4, "this is a string non-overflow test."); - assert(!strcmp(buf+4,"this is a string non-overflow test.")); + strcpy((char*)buf+4, "this is a string non-overflow test."); + strcpy((char*)buf+4, "this is a string non-overflow test."); + strcpy((char*)buf+4, "this is a string non-overflow test."); + strcpy((char*)buf+4, "this is a string non-overflow test."); + assert(!strcmp((char*)buf+4,"this is a string non-overflow test.")); assert(buf[43] == '\n'); assert(buf[42] == '\0'); assert(buf[41] == 0xff); @@ -44,4 +44,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_strtcpy_01.c b/centrallix-lib/tests/test_strtcpy_01.c index 93cfdc78f..c6dbc548a 100644 --- a/centrallix-lib/tests/test_strtcpy_01.c +++ b/centrallix-lib/tests/test_strtcpy_01.c @@ -26,15 +26,15 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - memccpy(buf+4, "this is a string non-overflow test.", '\0', 36-1); - (buf+4)[36-1] = '\0'; - memccpy(buf+4, "this is a string non-overflow test.", '\0', 36-1); - (buf+4)[36-1] = '\0'; - memccpy(buf+4, "this is a string non-overflow test.", '\0', 36-1); - (buf+4)[36-1] = '\0'; - memccpy(buf+4, "this is a string non-overflow test.", '\0', 36-1); - (buf+4)[36-1] = '\0'; - assert(!strcmp(buf+4,"this is a string non-overflow test.")); + memccpy((char*)buf+4, "this is a string non-overflow test.", '\0', 36-1); + ((char*)buf+4)[36-1] = '\0'; + memccpy((char*)buf+4, "this is a string non-overflow test.", '\0', 36-1); + ((char*)buf+4)[36-1] = '\0'; + memccpy((char*)buf+4, "this is a string non-overflow test.", '\0', 36-1); + ((char*)buf+4)[36-1] = '\0'; + memccpy((char*)buf+4, "this is a string non-overflow test.", '\0', 36-1); + ((char*)buf+4)[36-1] = '\0'; + assert(!strcmp((char*)buf+4,"this is a string non-overflow test.")); assert(buf[43] == '\n'); assert(buf[42] == '\0'); assert(buf[41] == 0xff); @@ -48,4 +48,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_strtcpy_02.c b/centrallix-lib/tests/test_strtcpy_02.c index 6a3c140ba..d64451482 100644 --- a/centrallix-lib/tests/test_strtcpy_02.c +++ b/centrallix-lib/tests/test_strtcpy_02.c @@ -26,11 +26,11 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - snprintf(buf+4, 36, "this is a string non-overflow test."); - snprintf(buf+4, 36, "this is a string non-overflow test."); - snprintf(buf+4, 36, "this is a string non-overflow test."); - snprintf(buf+4, 36, "this is a string non-overflow test."); - assert(!strcmp(buf+4,"this is a string non-overflow test.")); + snprintf((char*)buf+4, 36, "this is a string non-overflow test."); + snprintf((char*)buf+4, 36, "this is a string non-overflow test."); + snprintf((char*)buf+4, 36, "this is a string non-overflow test."); + snprintf((char*)buf+4, 36, "this is a string non-overflow test."); + assert(!strcmp((char*)buf+4,"this is a string non-overflow test.")); assert(buf[43] == '\n'); assert(buf[42] == '\0'); assert(buf[41] == 0xff); @@ -44,4 +44,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_strtcpy_03.c b/centrallix-lib/tests/test_strtcpy_03.c index 47a792a90..7dd6bd025 100644 --- a/centrallix-lib/tests/test_strtcpy_03.c +++ b/centrallix-lib/tests/test_strtcpy_03.c @@ -26,12 +26,12 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - strtcpy(buf+4, "this is a string non-overflow test.", 36); - strtcpy(buf+4, "this is a string non-overflow test.", 36); - strtcpy(buf+4, "this is a string non-overflow test.", 36); - rval = strtcpy(buf+4, "this is a string non-overflow test.", 36); + strtcpy((char*)buf+4, "this is a string non-overflow test.", 36); + strtcpy((char*)buf+4, "this is a string non-overflow test.", 36); + strtcpy((char*)buf+4, "this is a string non-overflow test.", 36); + rval = strtcpy((char*)buf+4, "this is a string non-overflow test.", 36); assert(rval == 36); - assert(!strcmp(buf+4,"this is a string non-overflow test.")); + assert(!strcmp((char*)buf+4,"this is a string non-overflow test.")); assert(buf[43] == '\n'); assert(buf[42] == '\0'); assert(buf[41] == 0xff); @@ -45,4 +45,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_strtcpy_04.c b/centrallix-lib/tests/test_strtcpy_04.c index c142b85ea..dbc81f268 100644 --- a/centrallix-lib/tests/test_strtcpy_04.c +++ b/centrallix-lib/tests/test_strtcpy_04.c @@ -26,12 +26,12 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - strtcpy(buf+4, "this is a string non-overflow test.?", 36); - strtcpy(buf+4, "this is a string non-overflow test.?", 36); - strtcpy(buf+4, "this is a string non-overflow test.?", 36); - rval = strtcpy(buf+4, "this is a string non-overflow test.?", 36); + strtcpy((char*)buf+4, "this is a string non-overflow test.?", 36); + strtcpy((char*)buf+4, "this is a string non-overflow test.?", 36); + strtcpy((char*)buf+4, "this is a string non-overflow test.?", 36); + rval = strtcpy((char*)buf+4, "this is a string non-overflow test.?", 36); assert(rval == -36); - assert(!strcmp(buf+4,"this is a string non-overflow test.")); + assert(!strcmp((char*)buf+4,"this is a string non-overflow test.")); assert(buf[43] == '\n'); assert(buf[42] == '\0'); assert(buf[41] == 0xff); @@ -45,4 +45,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_strtcpy_05.c b/centrallix-lib/tests/test_strtcpy_05.c index 2c20471df..d1098c76d 100644 --- a/centrallix-lib/tests/test_strtcpy_05.c +++ b/centrallix-lib/tests/test_strtcpy_05.c @@ -26,12 +26,12 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - strtcpy(buf+4, "this is a string non-overflow test... NOT!!", 36); - strtcpy(buf+4, "this is a string non-overflow test... NOT!!", 36); - strtcpy(buf+4, "this is a string non-overflow test... NOT!!", 36); - rval = strtcpy(buf+4, "this is a string non-overflow test... NOT!!", 36); + strtcpy((char*)buf+4, "this is a string non-overflow test... NOT!!", 36); + strtcpy((char*)buf+4, "this is a string non-overflow test... NOT!!", 36); + strtcpy((char*)buf+4, "this is a string non-overflow test... NOT!!", 36); + rval = strtcpy((char*)buf+4, "this is a string non-overflow test... NOT!!", 36); assert(rval == -36); - assert(!strcmp(buf+4,"this is a string non-overflow test.")); + assert(!strcmp((char*)buf+4,"this is a string non-overflow test.")); assert(buf[43] == '\n'); assert(buf[42] == '\0'); assert(buf[41] == 0xff); @@ -45,4 +45,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_strtcpy_06.c b/centrallix-lib/tests/test_strtcpy_06.c index 567d9f851..c19f3df82 100644 --- a/centrallix-lib/tests/test_strtcpy_06.c +++ b/centrallix-lib/tests/test_strtcpy_06.c @@ -28,10 +28,10 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - strtcpy(buf+4, "this is a string non-overflow test.?", 0); - strtcpy(buf+4, "this is a string non-overflow test.?", 0); - strtcpy(buf+4, "this is a string non-overflow test.?", 0); - rval = strtcpy(buf+4, "this is a string non-overflow test.?", 0); + strtcpy((char*)buf+4, "this is a string non-overflow test.?", 0); + strtcpy((char*)buf+4, "this is a string non-overflow test.?", 0); + strtcpy((char*)buf+4, "this is a string non-overflow test.?", 0); + rval = strtcpy((char*)buf+4, "this is a string non-overflow test.?", 0); assert(rval == 0); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -48,4 +48,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_strtcpy_07.c b/centrallix-lib/tests/test_strtcpy_07.c index 3e87297dc..63d0457cf 100644 --- a/centrallix-lib/tests/test_strtcpy_07.c +++ b/centrallix-lib/tests/test_strtcpy_07.c @@ -29,10 +29,10 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - strtcpy(buf+4, "this is a string non-overflow test.?", 1); - strtcpy(buf+4, "this is a string non-overflow test.?", 1); - strtcpy(buf+4, "this is a string non-overflow test.?", 1); - rval = strtcpy(buf+4, "this is a string non-overflow test.?", 1); + strtcpy((char*)buf+4, "this is a string non-overflow test.?", 1); + strtcpy((char*)buf+4, "this is a string non-overflow test.?", 1); + strtcpy((char*)buf+4, "this is a string non-overflow test.?", 1); + rval = strtcpy((char*)buf+4, "this is a string non-overflow test.?", 1); assert(rval == -1); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -50,4 +50,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_strtcpy_08.c b/centrallix-lib/tests/test_strtcpy_08.c index 30415b048..ebfa9e852 100644 --- a/centrallix-lib/tests/test_strtcpy_08.c +++ b/centrallix-lib/tests/test_strtcpy_08.c @@ -35,10 +35,10 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - strtcpy(buf+4, "this is a string non-overflow test.?", 2); - strtcpy(buf+4, "this is a string non-overflow test.?", 2); - strtcpy(buf+4, "this is a string non-overflow test.?", 2); - rval = strtcpy(buf+4, "this is a string non-overflow test.?", 2); + strtcpy((char*)buf+4, "this is a string non-overflow test.?", 2); + strtcpy((char*)buf+4, "this is a string non-overflow test.?", 2); + strtcpy((char*)buf+4, "this is a string non-overflow test.?", 2); + rval = strtcpy((char*)buf+4, "this is a string non-overflow test.?", 2); assert(rval == -2); assert(buf[43] == '\n'); assert(buf[42] == '\0'); @@ -56,4 +56,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_strtcpy_09.c b/centrallix-lib/tests/test_strtcpy_09.c index 929c1e109..50ca3eccc 100644 --- a/centrallix-lib/tests/test_strtcpy_09.c +++ b/centrallix-lib/tests/test_strtcpy_09.c @@ -27,12 +27,12 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - strtcpy(buf+4, "this is a non-overflow test.", 36); - strtcpy(buf+4, "this is a non-overflow test.", 36); - strtcpy(buf+4, "this is a non-overflow test.", 36); - rval = strtcpy(buf+4, "this is a non-overflow test.", 36); + strtcpy((char*)buf+4, "this is a non-overflow test.", 36); + strtcpy((char*)buf+4, "this is a non-overflow test.", 36); + strtcpy((char*)buf+4, "this is a non-overflow test.", 36); + rval = strtcpy((char*)buf+4, "this is a non-overflow test.", 36); assert(rval == 29); - assert(!strcmp(buf+4,"this is a non-overflow test.")); + assert(!strcmp((char*)buf+4,"this is a non-overflow test.")); assert(buf[43] == '\n'); assert(buf[42] == '\0'); assert(buf[41] == 0xff); @@ -47,4 +47,3 @@ test(char** tname) return iter*4; } - diff --git a/centrallix-lib/tests/test_strtcpy_10.c b/centrallix-lib/tests/test_strtcpy_10.c index 75e5e0465..95e4835c1 100644 --- a/centrallix-lib/tests/test_strtcpy_10.c +++ b/centrallix-lib/tests/test_strtcpy_10.c @@ -27,12 +27,12 @@ test(char** tname) buf[2] = '\0'; buf[1] = 0xff; buf[0] = '\0'; - strtcpy(buf+4, "", 36); - strtcpy(buf+4, "", 36); - strtcpy(buf+4, "", 36); - rval = strtcpy(buf+4, "", 36); + strtcpy((char*)buf+4, "", 36); + strtcpy((char*)buf+4, "", 36); + strtcpy((char*)buf+4, "", 36); + rval = strtcpy((char*)buf+4, "", 36); assert(rval == 1); - assert(!strcmp(buf+4,"")); + assert(!strcmp((char*)buf+4,"")); assert(buf[43] == '\n'); assert(buf[42] == '\0'); assert(buf[41] == 0xff); @@ -47,4 +47,3 @@ test(char** tname) return iter*4; } - From 501804828b35e92d383657d94d6c8725c731651d Mon Sep 17 00:00:00 2001 From: Lightning11wins Date: Tue, 7 Apr 2026 14:44:46 -0600 Subject: [PATCH 3/8] Clean up unused/uninitialized variable warnings. Remove unused n variable from test_mtlexer_07.c. Remove unused commonnames variable from test_mtlexer_15.c and test_mtlexer_16.c. Remove iter variable from test_02baseline.c that's initialized but never used. Add initialization code for the array variable in test_00baseline.c and test_03baseline.c. Clean up. --- centrallix-lib/tests/test_00baseline.c | 3 +-- centrallix-lib/tests/test_02baseline.c | 4 ---- centrallix-lib/tests/test_03baseline.c | 3 +-- centrallix-lib/tests/test_mtlexer_07.c | 2 -- centrallix-lib/tests/test_mtlexer_15.c | 2 -- centrallix-lib/tests/test_mtlexer_16.c | 2 -- 6 files changed, 2 insertions(+), 14 deletions(-) diff --git a/centrallix-lib/tests/test_00baseline.c b/centrallix-lib/tests/test_00baseline.c index 5101e6030..b2012c6b1 100644 --- a/centrallix-lib/tests/test_00baseline.c +++ b/centrallix-lib/tests/test_00baseline.c @@ -9,7 +9,7 @@ test(char** tname) { int i; int iter; - int array[2]; + int array[2] = {0}; *tname = "BASELINE - should pass"; iter = 1000*1000*300; @@ -17,4 +17,3 @@ test(char** tname) return iter; } - diff --git a/centrallix-lib/tests/test_02baseline.c b/centrallix-lib/tests/test_02baseline.c index 76618e1c0..ed0acf643 100644 --- a/centrallix-lib/tests/test_02baseline.c +++ b/centrallix-lib/tests/test_02baseline.c @@ -8,11 +8,7 @@ long long test(char** tname) { - int iter; - *tname = "BASELINE failed, return value - should fail"; - iter = 1000*1000*1000; return -1; } - diff --git a/centrallix-lib/tests/test_03baseline.c b/centrallix-lib/tests/test_03baseline.c index 766c8807e..c3fe06c87 100644 --- a/centrallix-lib/tests/test_03baseline.c +++ b/centrallix-lib/tests/test_03baseline.c @@ -9,7 +9,7 @@ long long test(char** tname) { int iter; - int array[2]; + int array[2] = {0}; *tname = "BASELINE sigsegv (11) caused - should crash"; iter = 1000*1000*1000; @@ -17,4 +17,3 @@ test(char** tname) return iter; } - diff --git a/centrallix-lib/tests/test_mtlexer_07.c b/centrallix-lib/tests/test_mtlexer_07.c index 278c2d2a9..b716c7135 100644 --- a/centrallix-lib/tests/test_mtlexer_07.c +++ b/centrallix-lib/tests/test_mtlexer_07.c @@ -15,7 +15,6 @@ test(char** tname) int j; int k; int t; - int n; int iter; int flags; pLxSession lxs; @@ -63,4 +62,3 @@ test(char** tname) return iter * n_tokens * n_iter; } - diff --git a/centrallix-lib/tests/test_mtlexer_15.c b/centrallix-lib/tests/test_mtlexer_15.c index a9410bc63..7baac7ab7 100644 --- a/centrallix-lib/tests/test_mtlexer_15.c +++ b/centrallix-lib/tests/test_mtlexer_15.c @@ -19,7 +19,6 @@ test(char** tname) int flagtypes[5] = { MLX_F_CPPCOMM, MLX_F_POUNDCOMM, MLX_F_SEMICOMM, MLX_F_DASHCOMM, MLX_F_CCOMM }; int n_flagtypes = 5; int flags; - char* commnames[5] = { "cppcomm", "poundcomm", "semicomm", "dashcomm", "ccomm" }; pLxSession lxs; pFile fd; @@ -54,4 +53,3 @@ test(char** tname) return iter * 10; } - diff --git a/centrallix-lib/tests/test_mtlexer_16.c b/centrallix-lib/tests/test_mtlexer_16.c index 644537137..e6cde7768 100644 --- a/centrallix-lib/tests/test_mtlexer_16.c +++ b/centrallix-lib/tests/test_mtlexer_16.c @@ -19,7 +19,6 @@ test(char** tname) int flagtypes[5] = { MLX_F_CPPCOMM, MLX_F_POUNDCOMM, MLX_F_SEMICOMM, MLX_F_DASHCOMM, MLX_F_CCOMM }; int n_flagtypes = 5; int flags; - char* commnames[5] = { "cppcomm", "poundcomm", "semicomm", "dashcomm", "ccomm" }; pLxSession lxs; pFile fd; @@ -54,4 +53,3 @@ test(char** tname) return iter * 10; } - From 23693151602e028256089ffcf7e3a9bd442ac8d7 Mon Sep 17 00:00:00 2001 From: Lightning11wins Date: Tue, 7 Apr 2026 15:16:54 -0600 Subject: [PATCH 4/8] Fix a warning caused by forgetting to #include . Clean up. --- centrallix-lib/tests/test_smmalloc_09.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/centrallix-lib/tests/test_smmalloc_09.c b/centrallix-lib/tests/test_smmalloc_09.c index 50c72123a..9315b71fe 100644 --- a/centrallix-lib/tests/test_smmalloc_09.c +++ b/centrallix-lib/tests/test_smmalloc_09.c @@ -8,6 +8,7 @@ #include #include #include +#include long long test(char** tname) @@ -83,4 +84,3 @@ test(char** tname) return iter; } - From 48d48c66f2d1272d5c69bf3d4ff46e27146dc196 Mon Sep 17 00:00:00 2001 From: Lightning11wins Date: Tue, 7 Apr 2026 15:58:04 -0600 Subject: [PATCH 5/8] Fix unused variable warnings in centrallix. Fix aposSetLimits() recording the return value of aposSetLimits_r(), but then always returning 0. Remove rval variable from nht_i_GET() because it was never read. Comment out code that isn't used anymore due to nearby code being commented out. Clean up. --- centrallix/multiquery/multiq_orderby.c | 1 - centrallix/netdrivers/net_http.c | 3 +-- centrallix/osdrivers/objdrv_qytree.c | 3 --- centrallix/wgtr/apos.c | 10 +++++----- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/centrallix/multiquery/multiq_orderby.c b/centrallix/multiquery/multiq_orderby.c index 9403df897..739795772 100644 --- a/centrallix/multiquery/multiq_orderby.c +++ b/centrallix/multiquery/multiq_orderby.c @@ -543,7 +543,6 @@ mqobFinish(pQueryElement qe, pQueryStatement stmt) { pMQOData context = (pMQOData)(qe->PrivateData); pMqobOrderable item; - pParamObjects objlist; pQueryElement cld; int i; diff --git a/centrallix/netdrivers/net_http.c b/centrallix/netdrivers/net_http.c index c74bc121b..b7a605fdd 100755 --- a/centrallix/netdrivers/net_http.c +++ b/centrallix/netdrivers/net_http.c @@ -1821,7 +1821,6 @@ nht_i_GET(pNhtConn conn, pStruct url_inf, char* if_modified_since) char* slashptr; pNhtApp app = NULL; pNhtAppGroup group = NULL; - int rval; char* kname; pXString err_xs; @@ -2329,7 +2328,7 @@ nht_i_GET(pNhtConn conn, pStruct url_inf, char* if_modified_since) else if (!strcmp(find_inf->StrVal,"rest")) { conn->StrictSameSite = 0; - rval = nht_i_RestGet(conn, url_inf, target_obj); + nht_i_RestGet(conn, url_inf, target_obj); } /** Retrieve a new session/group/app key? **/ diff --git a/centrallix/osdrivers/objdrv_qytree.c b/centrallix/osdrivers/objdrv_qytree.c index 72994bfef..bec2a511a 100644 --- a/centrallix/osdrivers/objdrv_qytree.c +++ b/centrallix/osdrivers/objdrv_qytree.c @@ -1325,8 +1325,6 @@ qytQueryFetch(void* qy_v, pObject obj, int mode, pObjTrxTree* oxt) pQytQuery qy = ((pQytQuery)(qy_v)); pQytData inf; pObject llobj = NULL; - pStructInf find_inf; - char* ptr; char* objname = NULL; int cur_id = -1; @@ -1883,4 +1881,3 @@ qytInitialize() return 0; } - diff --git a/centrallix/wgtr/apos.c b/centrallix/wgtr/apos.c index 8c3780205..3869245a9 100644 --- a/centrallix/wgtr/apos.c +++ b/centrallix/wgtr/apos.c @@ -311,7 +311,7 @@ int rval; rval = aposSetLimits_r(Parent, &delta_w, &delta_h); - return 0; + return rval; } @@ -682,8 +682,8 @@ pXArray FirstCross, LastCross; /**sanity check to make sure no widgets cross the border lines**/ if(xaCount(HLines)) //don't test borderlines unless they exist { - FirstCross = &(((pAposLine)xaGetItem(HLines, 0))->CWidgets); - LastCross = &(((pAposLine)xaGetItem(HLines, (xaCount(HLines)-1)))->CWidgets); + // FirstCross = &(((pAposLine)xaGetItem(HLines, 0))->CWidgets); + // LastCross = &(((pAposLine)xaGetItem(HLines, (xaCount(HLines)-1)))->CWidgets); /*if(xaCount(FirstCross)) mssError(1, "APOS", "%d widget(s) crossed the top borderline, including %s '%s'", xaCount(FirstCross), ((pWgtrNode)xaGetItem(FirstCross, 0))->Type, ((pWgtrNode)xaGetItem(FirstCross, 0))->Name); @@ -692,8 +692,8 @@ pXArray FirstCross, LastCross; ((pWgtrNode)xaGetItem(LastCross, 0))->Type, ((pWgtrNode)xaGetItem(LastCross, 0))->Name);*/ } - FirstCross = &(((pAposLine)xaGetItem(VLines, 0))->CWidgets); - LastCross = &(((pAposLine)xaGetItem(VLines, (xaCount(VLines)-1)))->CWidgets); +// FirstCross = &(((pAposLine)xaGetItem(VLines, 0))->CWidgets); +// LastCross = &(((pAposLine)xaGetItem(VLines, (xaCount(VLines)-1)))->CWidgets); /*if(xaCount(FirstCross)) mssError(1, "APOS", "%d widget(s) crossed the left borderline, including %s '%s'", xaCount(FirstCross), ((pWgtrNode)xaGetItem(FirstCross, 0))->Type, ((pWgtrNode)xaGetItem(FirstCross, 0))->Name); From b00ecd15dc2eb02b516413d6407df1d8a93cdc54 Mon Sep 17 00:00:00 2001 From: Lightning11wins Date: Tue, 7 Apr 2026 16:16:36 -0600 Subject: [PATCH 6/8] Remove id counters from widgets that don't use them. --- centrallix/htmlgen/htdrv_alerter.c | 14 -------------- centrallix/htmlgen/htdrv_componentdecl.c | 15 --------------- centrallix/htmlgen/htdrv_connector.c | 15 +-------------- centrallix/htmlgen/htdrv_execmethod.c | 14 -------------- centrallix/htmlgen/htdrv_form.c | 15 +-------------- centrallix/htmlgen/htdrv_hints.c | 14 -------------- centrallix/htmlgen/htdrv_parameter.c | 14 -------------- centrallix/htmlgen/htdrv_rule.c | 6 ------ centrallix/htmlgen/htdrv_timer.c | 15 --------------- centrallix/htmlgen/htdrv_uawindow.c | 14 -------------- centrallix/htmlgen/htdrv_variable.c | 15 +-------------- 11 files changed, 3 insertions(+), 148 deletions(-) diff --git a/centrallix/htmlgen/htdrv_alerter.c b/centrallix/htmlgen/htdrv_alerter.c index 216b2b979..1bba2c8e1 100644 --- a/centrallix/htmlgen/htdrv_alerter.c +++ b/centrallix/htmlgen/htdrv_alerter.c @@ -42,23 +42,11 @@ /************************************************************************/ -/** globals **/ -static struct - { - int idcnt; - } - HTALRT; - - /*** htalrtRender - generate the HTML code for the alert -- not much.. ***/ int htalrtRender(pHtSession s, pWgtrNode tree, int z) { - int id; - - /** Get an id for this. **/ - id = (HTALRT.idcnt++); /** Get name **/ htrAddScriptInit_va(s," alrt_init(wgtrGetNodeRef(ns,\"%STR&SYM\"));\n", wgtrGetName(tree)); @@ -76,8 +64,6 @@ htalrtInitialize() { pHtDriver drv; - HTALRT.idcnt = 0; - /** Allocate the driver **/ drv = htrAllocDriver(); if (!drv) return -1; diff --git a/centrallix/htmlgen/htdrv_componentdecl.c b/centrallix/htmlgen/htdrv_componentdecl.c index 546b5cbb3..3a3cb0e0e 100644 --- a/centrallix/htmlgen/htdrv_componentdecl.c +++ b/centrallix/htmlgen/htdrv_componentdecl.c @@ -48,14 +48,6 @@ /************************************************************************/ -/** globals **/ -static struct - { - int idcnt; - } - HTCMPD; - - /** structure defining a param to the component **/ typedef struct { @@ -79,7 +71,6 @@ htcmpdRender(pHtSession s, pWgtrNode tree, int z) char expose_actions_for[64] = ""; char expose_props_for[64] = ""; char apply_hints_to[64] = ""; - int id; /*char* nptr;*/ // pObject subobj = NULL; pWgtrNode sub_tree = NULL; @@ -102,9 +93,6 @@ htcmpdRender(pHtSession s, pWgtrNode tree, int z) return -1; } - /** Get an id for this. **/ - id = (HTCMPD.idcnt++); - /** Is this a visual component? **/ if ((is_visual = htrGetBoolean(tree, "visual", 1)) < 0) { @@ -423,8 +411,5 @@ htcmpdInitialize() /** Declare support for DHTML user interface class **/ htrAddSupport(drv, "dhtml"); - HTCMPD.idcnt = 0; - return 0; } - diff --git a/centrallix/htmlgen/htdrv_connector.c b/centrallix/htmlgen/htdrv_connector.c index bbb24d503..d16d198f6 100644 --- a/centrallix/htmlgen/htdrv_connector.c +++ b/centrallix/htmlgen/htdrv_connector.c @@ -45,14 +45,6 @@ /************************************************************************/ -/** globals **/ -static struct - { - int idcnt; - } - HTCONN; - - /*** htconnRender - generate the HTML code for the page. ***/ int @@ -67,7 +59,7 @@ htconnRender(pHtSession s, pWgtrNode tree, int z) char target[128]; char source[128]; char action[32] = ""; - int id, i; + int i; XString xs; pExpression code; int first; @@ -80,9 +72,6 @@ htconnRender(pHtSession s, pWgtrNode tree, int z) return -1; } - /** Get an id for this. **/ - id = (HTCONN.idcnt++); - /** Inside a component-decl-action? **/ if (tree->Parent && wgtrGetPropertyValue(tree->Parent, "outer_type", DATA_T_STRING, POD(&ptr)) == 0 && !strcmp(ptr, "widget/component-decl-action")) { @@ -272,7 +261,5 @@ htconnInitialize() htrAddSupport(drv, "dhtml"); - HTCONN.idcnt = 0; - return 0; } diff --git a/centrallix/htmlgen/htdrv_execmethod.c b/centrallix/htmlgen/htdrv_execmethod.c index ddae450b6..31d930902 100644 --- a/centrallix/htmlgen/htdrv_execmethod.c +++ b/centrallix/htmlgen/htdrv_execmethod.c @@ -44,14 +44,6 @@ /************************************************************************/ -/** globals **/ -static struct - { - int idcnt; - } - HTEX; - - /*** htexRender - generate the HTML code for the timer nonvisual widget. ***/ int @@ -59,7 +51,6 @@ htexRender(pHtSession s, pWgtrNode tree, int z) { char* ptr; char name[64]; - int id; char* objname; char* methodname = NULL; char* methodparam = NULL; @@ -70,9 +61,6 @@ htexRender(pHtSession s, pWgtrNode tree, int z) return -1; } - /** Get an id for this. **/ - id = (HTEX.idcnt++); - /** Get params. **/ if (wgtrGetPropertyValue(tree,"object",DATA_T_STRING,POD(&objname)) != 0) objname=""; if (wgtrGetPropertyValue(tree,"method",DATA_T_STRING,POD(&methodname)) != 0) methodname=""; @@ -122,7 +110,5 @@ htexInitialize() htrAddSupport(drv, "dhtml"); - HTEX.idcnt = 0; - return 0; } diff --git a/centrallix/htmlgen/htdrv_form.c b/centrallix/htmlgen/htdrv_form.c index 05e3d1202..e3cc04932 100644 --- a/centrallix/htmlgen/htdrv_form.c +++ b/centrallix/htmlgen/htdrv_form.c @@ -44,14 +44,6 @@ /************************************************************************/ -/** globals **/ -static struct - { - int idcnt; - } - HTFORM; - - /*** htformRender - generate the HTML code for the form 'glue' ***/ int @@ -66,7 +58,7 @@ htformRender(pHtSession s, pWgtrNode tree, int z) char link_prev[64]; char link_prev_within[64]; char interlock_with[256]; - int id, i, t; + int i, t; int allowquery, allownew, allowmodify, allowview, allownodata, multienter, allowdelete, confirmdelete; int confirmdiscard, allowmerge; int allowobscure = 0; @@ -78,9 +70,6 @@ htformRender(pHtSession s, pWgtrNode tree, int z) pStringVec sv; /** form widget should work on any browser **/ - - /** Get an id for this. **/ - id = (HTFORM.idcnt++); /** Get params. **/ allowquery = htrGetBoolean(tree, "allow_query", 1); @@ -305,7 +294,5 @@ htformInitialize() htrAddSupport(drv, "dhtml"); - HTFORM.idcnt = 0; - return 0; } diff --git a/centrallix/htmlgen/htdrv_hints.c b/centrallix/htmlgen/htdrv_hints.c index e9ca6bec8..35118bb51 100644 --- a/centrallix/htmlgen/htdrv_hints.c +++ b/centrallix/htmlgen/htdrv_hints.c @@ -43,26 +43,14 @@ /************************************************************************/ -/** globals **/ -static struct - { - int idcnt; - } - HTHINT; - - /*** hthintRender - generate the HTML code for the page. ***/ int hthintRender(pHtSession s, pWgtrNode tree, int z) { - int id; pObjPresentationHints hints; XString xs; - /** Get an id for this. **/ - id = (HTHINT.idcnt++); - /** Convert the object data into hints data **/ hints = wgtrWgtToHints(tree); if (!hints) @@ -109,7 +97,5 @@ hthintInitialize() htrAddSupport(drv, "dhtml"); - HTHINT.idcnt = 0; - return 0; } diff --git a/centrallix/htmlgen/htdrv_parameter.c b/centrallix/htmlgen/htdrv_parameter.c index 2a8213309..7b71d5aa7 100644 --- a/centrallix/htmlgen/htdrv_parameter.c +++ b/centrallix/htmlgen/htdrv_parameter.c @@ -45,14 +45,6 @@ /************************************************************************/ -/** globals **/ -static struct - { - int idcnt; - } - HTPARAM; - - /*** htparamRender - generate the HTML code for the page. ***/ int @@ -63,7 +55,6 @@ htparamRender(pHtSession s, pWgtrNode tree, int z) char paramname[64]; char type[32]; char findcontainer[64]; - int id; int i; XString xs; pObjPresentationHints hints; @@ -76,9 +67,6 @@ htparamRender(pHtSession s, pWgtrNode tree, int z) return -1; } - /** Get an id for this. **/ - id = (HTPARAM.idcnt++); - /** Get name and type **/ if (wgtrGetPropertyValue(tree,"name",DATA_T_STRING,POD(&ptr)) != 0) return -1; @@ -177,7 +165,5 @@ htparamInitialize() htrAddSupport(drv, "dhtml"); - HTPARAM.idcnt = 0; - return 0; } diff --git a/centrallix/htmlgen/htdrv_rule.c b/centrallix/htmlgen/htdrv_rule.c index fd245eb96..ec1ee0b4a 100644 --- a/centrallix/htmlgen/htdrv_rule.c +++ b/centrallix/htmlgen/htdrv_rule.c @@ -65,7 +65,6 @@ typedef struct _RD /** globals **/ static struct { - int idcnt; pHtRuleDefinition RuletypeList; } HTRULE; @@ -76,7 +75,6 @@ static struct int htruleRender(pHtSession s, pWgtrNode tree, int z) { - int id; char* nptr; char* ptr; pXString xs = NULL; @@ -90,9 +88,6 @@ htruleRender(pHtSession s, pWgtrNode tree, int z) pHtRuleDefinition def; int i, found; - /** Get an id for this. **/ - id = (HTRULE.idcnt++); - xs = (pXString)nmMalloc(sizeof(XString)); if (!xs) goto error; xsInit(xs); @@ -275,7 +270,6 @@ htruleInitialize() htrAddSupport(drv, "dhtml"); - HTRULE.idcnt = 0; HTRULE.RuletypeList = NULL; return 0; diff --git a/centrallix/htmlgen/htdrv_timer.c b/centrallix/htmlgen/htdrv_timer.c index 9ebb381f6..65be49c7a 100644 --- a/centrallix/htmlgen/htdrv_timer.c +++ b/centrallix/htmlgen/htdrv_timer.c @@ -43,15 +43,6 @@ /************************************************************************/ -/** globals **/ -static struct - { - int idcnt; - } - HTTM; - - - /*** httmRender - generate the HTML code for the timer nonvisual widget. ***/ int @@ -59,7 +50,6 @@ httmRender(pHtSession s, pWgtrNode tree, int z) { char* ptr; char name[64]; - int id; int msec; int auto_reset = 0; int auto_start = 1; @@ -70,9 +60,6 @@ httmRender(pHtSession s, pWgtrNode tree, int z) return -1; } - /** Get an id for this. **/ - id = (HTTM.idcnt++); - /** Get msec for timer countdown **/ if (wgtrGetPropertyValue(tree,"msec",DATA_T_INTEGER,POD(&msec)) != 0) { @@ -132,7 +119,5 @@ httmInitialize() htrAddSupport(drv, "dhtml"); - HTTM.idcnt = 0; - return 0; } diff --git a/centrallix/htmlgen/htdrv_uawindow.c b/centrallix/htmlgen/htdrv_uawindow.c index 9f967c1e6..3349c4c6c 100644 --- a/centrallix/htmlgen/htdrv_uawindow.c +++ b/centrallix/htmlgen/htdrv_uawindow.c @@ -41,20 +41,11 @@ /************************************************************************/ -/** globals **/ -static struct - { - int idcnt; - } - HTUAWIN; - - /*** htuawinRender - generate the HTML code for the page. ***/ int htuawinRender(pHtSession s, pWgtrNode tree, int z) { - int id; char name[64]; int is_shared = 0; int is_multi = 0; @@ -64,9 +55,6 @@ htuawinRender(pHtSession s, pWgtrNode tree, int z) int height = 480; char* ptr; - /** Get an id for this. **/ - id = (HTUAWIN.idcnt++); - /** Get name **/ if (wgtrGetPropertyValue(tree,"name",DATA_T_STRING,POD(&ptr)) != 0) return -1; strtcpy(name,ptr,sizeof(name)); @@ -137,7 +125,5 @@ htuawinInitialize() htrAddSupport(drv, "dhtml"); - HTUAWIN.idcnt = 0; - return 0; } diff --git a/centrallix/htmlgen/htdrv_variable.c b/centrallix/htmlgen/htdrv_variable.c index 81e0953dd..13b5a5a0a 100644 --- a/centrallix/htmlgen/htdrv_variable.c +++ b/centrallix/htmlgen/htdrv_variable.c @@ -42,14 +42,6 @@ /************************************************************************/ -/** globals **/ -static struct - { - int idcnt; - } - HTVBL; - - /*** htvblRender - generate the HTML code for the page. ***/ int @@ -60,15 +52,12 @@ htvblRender(pHtSession s, pWgtrNode tree, int z) char fieldname[HT_FIELDNAME_SIZE]; char form[64]; int t; - int id, i; + int i; int n = 0; char* vptr = NULL; int is_null = 1; pExpression code; - /** Get an id for this. **/ - id = (HTVBL.idcnt++); - /** Get name **/ if (wgtrGetPropertyValue(tree,"name",DATA_T_STRING,POD(&ptr)) != 0) return -1; strtcpy(name,ptr,sizeof(name)); @@ -155,7 +144,5 @@ htvblInitialize() htrAddSupport(drv, "dhtml"); - HTVBL.idcnt = 0; - return 0; } From 2c172b20f85626593b05c8046118c61c075ae5ca Mon Sep 17 00:00:00 2001 From: Lightning11wins Date: Tue, 7 Apr 2026 16:22:33 -0600 Subject: [PATCH 7/8] Remove dead code that was causing warnings. --- centrallix/htmlgen/htdrv_multiscroll.c | 7 ------- centrallix/wgtr/apos.c | 9 +-------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/centrallix/htmlgen/htdrv_multiscroll.c b/centrallix/htmlgen/htdrv_multiscroll.c index 2db7a3d66..c9c5676f0 100644 --- a/centrallix/htmlgen/htdrv_multiscroll.c +++ b/centrallix/htmlgen/htdrv_multiscroll.c @@ -63,7 +63,6 @@ htmsRender(pHtSession s, pWgtrNode tree, int z) int x=-1,y=-1,w,h,ch,total_h,top_h,total_h_accum,cy; int id; int i, cnt; - int box_offset; int always_visible; pWgtrNode childlist[32]; pWgtrNode child; @@ -94,12 +93,6 @@ htmsRender(pHtSession s, pWgtrNode tree, int z) /** Background color/image? **/ htrGetBackground(tree,NULL,!s->Capabilities.Dom0NS,main_bg,sizeof(main_bg)); - /** figure out box offset fudge factor... stupid box model... **/ - if (s->Capabilities.CSSBox) - box_offset = 1; - else - box_offset = 0; - /** Get name **/ if (wgtrGetPropertyValue(tree,"name",DATA_T_STRING,POD(&ptr)) != 0) return -1; strtcpy(name,ptr,sizeof(name)); diff --git a/centrallix/wgtr/apos.c b/centrallix/wgtr/apos.c index 3869245a9..f93a15ebf 100644 --- a/centrallix/wgtr/apos.c +++ b/centrallix/wgtr/apos.c @@ -1260,7 +1260,7 @@ pWgtrNode Widget; int aposProcessWindows(pWgtrNode VisualRef, pWgtrNode Parent) { -int i=0, changed=0, isWin=0, isSP=0; +int i=0, isWin=0, isSP=0; int childCount=xaCount(&(Parent->Children)); pWgtrNode Child; int rw, rh, rpw, rph; @@ -1302,32 +1302,25 @@ int ival; { Child->x = (rw - Child->width)/2; if (Child->x < 0) Child->x = 0; - changed = 1; } if (abs(Child->pre_y - (rph - (Child->pre_y + Child->pre_height))) < 10) { Child->y = (rh - Child->height)/2; if (Child->y < 0) Child->y = 0; - changed = 1; } /**if it's larger than its container, shrink it and set flag**/ if(Child->width > (rw - isSP*18)) { Child->width = (rw - isSP*18); - changed = 1; } if(Child->height > (rh - isWin*24)) { Child->height = (rh - isWin*24); - changed = 1; } /**if the window changed width or height, process it like a widget tree**/ - //if(changed) aposAutoPositionWidgetTree(Child); - /*Child->width = Child->pre_width; - Child->height = Child->pre_height;*/ /**if it's outside the top left corner pull the whole window in**/ if(Child->x < 0) Child->x = 0; From 483540a3d971d090c72483f1ed7cd306d8221391 Mon Sep 17 00:00:00 2001 From: Lightning11wins Date: Tue, 7 Apr 2026 16:32:46 -0600 Subject: [PATCH 8/8] Fix warnings in centrallix test-obj tests. Add typecasts to function pointers to explicitly change the type. Add typecasts to hexify tests. --- centrallix/tests/t_driver.c | 5 ++--- centrallix/tests/test_cxss_hexify_00.c | 2 +- centrallix/tests/test_cxss_hexify_01.c | 2 +- centrallix/tests/test_cxss_hexify_02.c | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/centrallix/tests/t_driver.c b/centrallix/tests/t_driver.c index b0b77e3b0..34a132b92 100644 --- a/centrallix/tests/t_driver.c +++ b/centrallix/tests/t_driver.c @@ -50,7 +50,7 @@ print_result(char * result, bool succeeded) #ifdef HAVE_NCURSES if (use_curses) { // Clear blue color from stderr - tputs(tparm(tigetstr("sgr0")), 1, puterr); + tputs(tparm(tigetstr("sgr0")), 1, (int(*)(int))puterr); } #endif @@ -110,7 +110,7 @@ start(void* v) if (use_curses) { // Set any error output to be blue - tputs(tparm(tigetstr("setaf"), COLOR_BLUE), 1, puterr); + tputs(tparm(tigetstr("setaf"), COLOR_BLUE), 1, (int(*)(int))puterr); } #endif @@ -132,4 +132,3 @@ main(int argc, char* argv[]) mtInitialize(0, start); return 0; } - diff --git a/centrallix/tests/test_cxss_hexify_00.c b/centrallix/tests/test_cxss_hexify_00.c index beeaa0701..eb8a0d443 100644 --- a/centrallix/tests/test_cxss_hexify_00.c +++ b/centrallix/tests/test_cxss_hexify_00.c @@ -26,7 +26,7 @@ test_hexify(char* str, char* cmp, int dstbuflen, int cmprval) buf1[len+2+2] = 0; memset(buf2, 127, sizeof(buf2)); - rval = cxssHexify(buf1+2, len, buf2+2, dstbuflen); + rval = cxssHexify((unsigned char*)buf1+2, len, buf2+2, dstbuflen); assert(rval == cmprval); assert(buf1[0] == 0); diff --git a/centrallix/tests/test_cxss_hexify_01.c b/centrallix/tests/test_cxss_hexify_01.c index 0307ab558..a0d3bb421 100644 --- a/centrallix/tests/test_cxss_hexify_01.c +++ b/centrallix/tests/test_cxss_hexify_01.c @@ -26,7 +26,7 @@ test_hexify(char* str, char* cmp, int dstlen, int cmprval) buf1[len+2+2] = 0; memset(buf2, 127, sizeof(buf2)); - rval = cxss_i_Hexify(buf1+2, len, buf2+2, dstlen); + rval = cxss_i_Hexify((unsigned char*)buf1+2, len, buf2+2, dstlen); assert(rval == cmprval); assert(buf1[0] == 0); diff --git a/centrallix/tests/test_cxss_hexify_02.c b/centrallix/tests/test_cxss_hexify_02.c index 67fd4f58f..b7bbbf224 100644 --- a/centrallix/tests/test_cxss_hexify_02.c +++ b/centrallix/tests/test_cxss_hexify_02.c @@ -21,7 +21,7 @@ test_hexify(char* str, char* cmp, int dstlen, int cmprval) memset(buf1, 127, sizeof(buf1)); strcpy(buf1+2, str); - rval = cxss_i_Hexify(buf1+2, len, buf1+2, dstlen); + rval = cxss_i_Hexify((unsigned char*)buf1+2, len, buf1+2, dstlen); assert(rval == cmprval);