Merge pull request #25 from mfernandez/2c47a40f-4c7d-41c5-92a6-c2905fffd6ce Insert whitespace in-between string literals
diff --git a/libsel4test/include/sel4test/test.h b/libsel4test/include/sel4test/test.h index fda5a5e..daaa078 100644 --- a/libsel4test/include/sel4test/test.h +++ b/libsel4test/include/sel4test/test.h
@@ -116,10 +116,10 @@ #define test_op_type(a, b, op, t, name_a, name_b, cast) \ do {\ if (!(a op b)) { \ - int len = snprintf(NULL, 0, "Check %s("t") %s %s("t") failed.",\ + int len = snprintf(NULL, 0, "Check %s(" t ") %s %s(" t ") failed.",\ #name_a, (cast) a, #op, #name_b, (cast) b) + 1; \ char buffer[len]; \ - snprintf(buffer, len, "Check %s("t") %s %s("t") failed.",\ + snprintf(buffer, len, "Check %s(" t ") %s %s(" t ") failed.",\ #name_a, (cast) a, #op, #name_b, (cast) b); \ _test_error(buffer, __FILE__, __LINE__); \ }\ @@ -151,7 +151,7 @@ } else if (TYPES_COMPATIBLE(typeof(_a), char)) {\ test_op_type(_a, _b, op, "%c", a, b, char); \ } else if (TYPES_COMPATIBLE(typeof(_a), uintptr_t)) {\ - test_op_type(_a, _b, op, "0x%"PRIxPTR, a, b, uintptr_t);\ + test_op_type(_a, _b, op, "0x%" PRIxPTR, a, b, uintptr_t);\ } else { \ _test_error("Cannot use test_op on this type", __FILE__, __LINE__);\ }\ @@ -170,9 +170,9 @@ #define test_strop(a, b, op) \ do {\ if (strnlen(a, __TEST_MAX_STRING) == __TEST_MAX_STRING) {\ - _test_error("String "#a" too long for test_str* macros", __FILE__, __LINE__);\ + _test_error("String " #a " too long for test_str* macros", __FILE__, __LINE__);\ } else if (strnlen(b, __TEST_MAX_STRING) == __TEST_MAX_STRING) {\ - _test_error("String "#b" too long for test_str* macros", __FILE__, __LINE__);\ + _test_error("String " #b " too long for test_str* macros", __FILE__, __LINE__);\ } else if (!(strncmp(a, b, __TEST_MAX_STRING)) op 0) {\ char buffer[__TEST_BUFFER_SIZE + 2 * __TEST_MAX_STRING];\ snprintf(buffer, sizeof(buffer),\
diff --git a/libsel4vka/include/vka/cspacepath_t.h b/libsel4vka/include/vka/cspacepath_t.h index cb46696..3f1cefb 100644 --- a/libsel4vka/include/vka/cspacepath_t.h +++ b/libsel4vka/include/vka/cspacepath_t.h
@@ -95,13 +95,13 @@ inline static void cspacepath_t_print(const cspacepath_t* src) { (void)(src); - CSPACEPATHPRINT("capPtr: 0x%"PRIx32"\n", src->capPtr); - CSPACEPATHPRINT("capDepth: 0x%"PRIx32"\n", src->capDepth); - CSPACEPATHPRINT("root: 0x%"PRIx32"\n", src->root); - CSPACEPATHPRINT("dest: 0x%"PRIx32"\n", src->dest); - CSPACEPATHPRINT("destDepth: 0x%"PRIx32"\n", src->destDepth); - CSPACEPATHPRINT("offset: 0x%"PRIx32"\n", src->offset); - CSPACEPATHPRINT("window: 0x%"PRIx32"\n", src->window); + CSPACEPATHPRINT("capPtr: 0x%" PRIx32 "\n", src->capPtr); + CSPACEPATHPRINT("capDepth: 0x%" PRIx32 "\n", src->capDepth); + CSPACEPATHPRINT("root: 0x%" PRIx32 "\n", src->root); + CSPACEPATHPRINT("dest: 0x%" PRIx32 "\n", src->dest); + CSPACEPATHPRINT("destDepth: 0x%" PRIx32 "\n", src->destDepth); + CSPACEPATHPRINT("offset: 0x%" PRIx32 "\n", src->offset); + CSPACEPATHPRINT("window: 0x%" PRIx32 "\n", src->window); } #endif /* _CSPACEPATH_T_H_ */