add-ons/kernel: add spaces between literals and identifiers

Due to introduction of user-defined suffixes C++11 requires that there
is a space between literal and identifier to avoid ambiguity.

This patch makes the whole kernel build successfully with C++11.
This commit is contained in:
Pawel Dziepak
2014-05-08 23:07:50 +02:00
parent edc6d1558e
commit 578558b439
12 changed files with 39 additions and 39 deletions
@@ -59,32 +59,32 @@
#define SHOW_FLOW(seriousness, format, param...) \
do { if( seriousness <= debug_level_flow && seriousness <= DEBUG_MAX_LEVEL_FLOW ) { \
dprintf( "%s%s: "format"\n", FUNC_NAME, param ); DEBUG_WAIT \
dprintf("%s%s: " format "\n", FUNC_NAME, param ); DEBUG_WAIT \
}} while( 0 )
#define SHOW_FLOW0(seriousness, format) \
do { if( seriousness <= debug_level_flow && seriousness <= DEBUG_MAX_LEVEL_FLOW ) { \
dprintf( "%s%s: "format"\n", FUNC_NAME); DEBUG_WAIT \
dprintf("%s%s: " format "\n", FUNC_NAME); DEBUG_WAIT \
}} while( 0 )
#define SHOW_INFO(seriousness, format, param...) \
do { if( seriousness <= debug_level_info && seriousness <= DEBUG_MAX_LEVEL_INFO ) { \
dprintf( "%s%s: "format"\n", FUNC_NAME, param ); DEBUG_WAIT \
dprintf("%s%s: " format "\n", FUNC_NAME, param ); DEBUG_WAIT \
}} while( 0 )
#define SHOW_INFO0(seriousness, format) \
do { if( seriousness <= debug_level_info && seriousness <= DEBUG_MAX_LEVEL_INFO ) { \
dprintf( "%s%s: "format"\n", FUNC_NAME); DEBUG_WAIT \
dprintf("%s%s: " format "\n", FUNC_NAME); DEBUG_WAIT \
}} while( 0 )
#define SHOW_ERROR(seriousness, format, param...) \
do { if( seriousness <= debug_level_error && seriousness <= DEBUG_MAX_LEVEL_ERROR ) { \
dprintf( "%s%s: "format"\n", FUNC_NAME, param ); DEBUG_WAIT_ERROR \
dprintf("%s%s: " format "\n", FUNC_NAME, param ); DEBUG_WAIT_ERROR \
}} while( 0 )
#define SHOW_ERROR0(seriousness, format) \
do { if( seriousness <= debug_level_error && seriousness <= DEBUG_MAX_LEVEL_ERROR ) { \
dprintf( "%s%s: "format"\n", FUNC_NAME); DEBUG_WAIT_ERROR \
dprintf("%s%s: " format "\n", FUNC_NAME); DEBUG_WAIT_ERROR \
}} while( 0 )
#endif /* _WRAPPER_H */
+1 -1
View File
@@ -312,7 +312,7 @@ status_t
queue_bulk(usb_pipe pipe, void *data, size_t dataLength,
usb_callback_func callback, void *callbackCookie)
{
TRACE_MODULE("queue_bulk(%"B_PRId32 ", %p, %" B_PRIuSIZE ", %p, %p)\n",
TRACE_MODULE("queue_bulk(%" B_PRId32 ", %p, %" B_PRIuSIZE ", %p, %p)\n",
pipe, data, dataLength, callback, callbackCookie);
Object *object = gUSBStack->GetObject(pipe);
if (!object || (object->Type() & USB_OBJECT_BULK_PIPE) == 0)
@@ -25,7 +25,7 @@
#ifdef TRACE_USB
#define TRACE(x...) TRACE_OUTPUT(this, "", x)
#define TRACE_STATIC(x, y...) TRACE_OUTPUT(x, "", y)
#define TRACE_MODULE(x...) dprintf("usb "USB_MODULE_NAME": "x)
#define TRACE_MODULE(x...) dprintf("usb " USB_MODULE_NAME ": " x)
#else
#define TRACE(x...) /* nothing */
#define TRACE_STATIC(x, y...) /* nothing */
@@ -34,8 +34,8 @@
#define TRACE_ALWAYS(x...) TRACE_OUTPUT(this, "", x)
#define TRACE_ERROR(x...) TRACE_OUTPUT(this, "error ", x)
#define TRACE_MODULE_ALWAYS(x...) dprintf("usb "USB_MODULE_NAME": "x)
#define TRACE_MODULE_ERROR(x...) dprintf("usb "USB_MODULE_NAME": "x)
#define TRACE_MODULE_ALWAYS(x...) dprintf("usb " USB_MODULE_NAME ": " x)
#define TRACE_MODULE_ERROR(x...) dprintf("usb " USB_MODULE_NAME ": " x)
class Hub;
class Stack;
+1 -1
View File
@@ -69,7 +69,7 @@ print_descriptor_chain(ehci_qtd *descriptor)
while (descriptor) {
dprintf(" %08" B_PRIx32 " n%08" B_PRIx32 " a%08" B_PRIx32 " t%08" B_PRIx32
" %08" B_PRIx32 " %08" B_PRIx32 " %08" B_PRIx32 " %08" B_PRIx32
" %08" B_PRIx32 " s%"B_PRIuSIZE "\n",
" %08" B_PRIx32 " s%" B_PRIuSIZE "\n",
descriptor->this_phy, descriptor->next_phy,
descriptor->alt_next_phy, descriptor->token,
descriptor->buffer_phy[0], descriptor->buffer_phy[1],
+1 -1
View File
@@ -21,7 +21,7 @@
//#define TRACE_MTRR
#ifdef TRACE_MTRR
# define TRACE(x...) dprintf("mtrr: "x)
# define TRACE(x...) dprintf("mtrr: " x)
#else
# define TRACE(x...) /* nothing */
#endif
@@ -29,11 +29,11 @@
//#define TRACE_USB_DISK
#ifdef TRACE_USB_DISK
#define TRACE(x...) dprintf(DRIVER_NAME": "x)
#define TRACE_ALWAYS(x...) dprintf(DRIVER_NAME": "x)
#define TRACE(x...) dprintf(DRIVER_NAME ": " x)
#define TRACE_ALWAYS(x...) dprintf(DRIVER_NAME ": " x)
#else
#define TRACE(x...) /* nothing */
#define TRACE_ALWAYS(x...) dprintf(DRIVER_NAME": "x)
#define TRACE_ALWAYS(x...) dprintf(DRIVER_NAME ": " x)
#endif
@@ -796,7 +796,7 @@ usb_disk_device_added(usb_device newDevice, void **cookie)
result = usb_disk_inquiry(lun);
err_act action = err_act_ok;
for (uint32 tries = 0; tries < 8; tries++) {
TRACE("usb lun %"B_PRIu8" inquiry attempt %"B_PRIu32" begin\n",
TRACE("usb lun %" B_PRIu8 " inquiry attempt %" B_PRIu32 " begin\n",
i, tries);
status_t ready = usb_disk_test_unit_ready(lun, &action);
if (ready == B_OK || ready == B_DEV_NO_MEDIA
@@ -808,18 +808,18 @@ usb_disk_device_added(usb_device newDevice, void **cookie)
else if (/*usb_disk_mode_sense(lun) != B_OK*/true)
lun->write_protected = false;
TRACE("usb lun %"B_PRIu8" ready. write protected = %c%s\n", i,
TRACE("usb lun %" B_PRIu8 " ready. write protected = %c%s\n", i,
lun->write_protected ? 'y' : 'n',
ready == B_DEV_NO_MEDIA ? " (no media inserted)" : "");
break;
}
TRACE("usb lun %"B_PRIu8" inquiry attempt %"B_PRIu32" failed\n",
TRACE("usb lun %" B_PRIu8 " inquiry attempt %" B_PRIu32 " failed\n",
i, tries);
if (action != err_act_retry && action != err_act_many_retries)
break;
bigtime_t snoozeTime = 1000000 * tries;
TRACE("snoozing %"B_PRIu64" microseconds for usb lun\n",
TRACE("snoozing %" B_PRIu64 " microseconds for usb lun\n",
snoozeTime);
snooze(snoozeTime);
}
@@ -23,11 +23,11 @@
//#define TRACE_USB_DISK
#ifdef TRACE_USB_DISK
#define TRACE(x...) dprintf("\x1B[35m"DRIVER_NAME"\x1B[0m: "x)
#define TRACE_ALWAYS(x...) dprintf("\x1B[35m"DRIVER_NAME"\x1B[0m: "x)
#define TRACE(x...) dprintf("\x1B[35m" DRIVER_NAME "\x1B[0m: " x)
#define TRACE_ALWAYS(x...) dprintf("\x1B[35m" DRIVER_NAME "\x1B[0m: " x)
#else
#define TRACE(x...) /* nothing */
#define TRACE_ALWAYS(x...) dprintf("\x1B[35m"DRIVER_NAME"\x1B[0m: "x)
#define TRACE_ALWAYS(x...) dprintf("\x1B[35m" DRIVER_NAME "\x1B[0m: " x)
#endif
@@ -81,7 +81,7 @@ usb_serial_trace(bool force, const char *format, ...)
static char buffer[1024];
char *bufferPointer = buffer;
if (!gLogToFile) {
const char *prefix = "\33[32m"DRIVER_NAME":\33[0m ";
const char *prefix = "\33[32m" DRIVER_NAME ":\33[0m ";
strcpy(bufferPointer, prefix);
bufferPointer += strlen(prefix);
}
@@ -31,11 +31,11 @@
// #define TRACE_USB_PRINTER 1
#ifdef TRACE_USB_PRINTER
#define TRACE(x...) dprintf(DRIVER_NAME": "x)
#define TRACE_ALWAYS(x...) dprintf(DRIVER_NAME": "x)
#define TRACE(x...) dprintf(DRIVER_NAME ": " x)
#define TRACE_ALWAYS(x...) dprintf(DRIVER_NAME ": " x)
#else
#define TRACE(x...) /* nothing */
#define TRACE_ALWAYS(x...) dprintf(DRIVER_NAME": "x)
#define TRACE_ALWAYS(x...) dprintf(DRIVER_NAME ": " x)
#endif
@@ -2580,7 +2580,7 @@ overlay_std_ops(int32 op, ...)
static file_system_module_info sOverlayFileSystem = {
{
"file_systems/write_overlay"B_CURRENT_FS_API_VERSION,
"file_systems/write_overlay" B_CURRENT_FS_API_VERSION,
0,
overlay_std_ops,
},
@@ -59,32 +59,32 @@
#define SHOW_FLOW(seriousness, format, param...) \
do { if( seriousness <= debug_level_flow && seriousness <= DEBUG_MAX_LEVEL_FLOW ) { \
dprintf( "%s%s: "format"\n", FUNC_NAME, param ); DEBUG_WAIT \
dprintf("%s%s: " format "\n", FUNC_NAME, param ); DEBUG_WAIT \
}} while( 0 )
#define SHOW_FLOW0(seriousness, format) \
do { if( seriousness <= debug_level_flow && seriousness <= DEBUG_MAX_LEVEL_FLOW ) { \
dprintf( "%s%s: "format"\n", FUNC_NAME); DEBUG_WAIT \
dprintf("%s%s: " format "\n", FUNC_NAME); DEBUG_WAIT \
}} while( 0 )
#define SHOW_INFO(seriousness, format, param...) \
do { if( seriousness <= debug_level_info && seriousness <= DEBUG_MAX_LEVEL_INFO ) { \
dprintf( "%s%s: "format"\n", FUNC_NAME, param ); DEBUG_WAIT \
dprintf("%s%s: " format "\n", FUNC_NAME, param ); DEBUG_WAIT \
}} while( 0 )
#define SHOW_INFO0(seriousness, format) \
do { if( seriousness <= debug_level_info && seriousness <= DEBUG_MAX_LEVEL_INFO ) { \
dprintf( "%s%s: "format"\n", FUNC_NAME); DEBUG_WAIT \
dprintf("%s%s: " format "\n", FUNC_NAME); DEBUG_WAIT \
}} while( 0 )
#define SHOW_ERROR(seriousness, format, param...) \
do { if( seriousness <= debug_level_error && seriousness <= DEBUG_MAX_LEVEL_ERROR ) { \
dprintf( "%s%s: "format"\n", FUNC_NAME, param ); DEBUG_WAIT_ERROR \
dprintf("%s%s: " format "\n", FUNC_NAME, param ); DEBUG_WAIT_ERROR \
}} while( 0 )
#define SHOW_ERROR0(seriousness, format) \
do { if( seriousness <= debug_level_error && seriousness <= DEBUG_MAX_LEVEL_ERROR ) { \
dprintf( "%s%s: "format"\n", FUNC_NAME); DEBUG_WAIT_ERROR \
dprintf("%s%s: " format "\n", FUNC_NAME); DEBUG_WAIT_ERROR \
}} while( 0 )
#endif /* _BENAPHORE_H */
@@ -52,32 +52,32 @@
#define SHOW_FLOW(seriousness, format, param...) \
do { if( seriousness <= debug_level_flow && seriousness <= DEBUG_MAX_LEVEL_FLOW ) { \
dprintf( "%s%s: "format"\n", FUNC_NAME, param ); DEBUG_WAIT \
dprintf("%s%s: " format "\n", FUNC_NAME, param ); DEBUG_WAIT \
}} while( 0 )
#define SHOW_FLOW0(seriousness, format) \
do { if( seriousness <= debug_level_flow && seriousness <= DEBUG_MAX_LEVEL_FLOW ) { \
dprintf( "%s%s: "format"\n", FUNC_NAME); DEBUG_WAIT \
dprintf("%s%s: " format "\n", FUNC_NAME); DEBUG_WAIT \
}} while( 0 )
#define SHOW_INFO(seriousness, format, param...) \
do { if( seriousness <= debug_level_info && seriousness <= DEBUG_MAX_LEVEL_INFO ) { \
dprintf( "%s%s: "format"\n", FUNC_NAME, param ); DEBUG_WAIT \
dprintf("%s%s: " format "\n", FUNC_NAME, param ); DEBUG_WAIT \
}} while( 0 )
#define SHOW_INFO0(seriousness, format) \
do { if( seriousness <= debug_level_info && seriousness <= DEBUG_MAX_LEVEL_INFO ) { \
dprintf( "%s%s: "format"\n", FUNC_NAME); DEBUG_WAIT \
dprintf("%s%s: " format "\n", FUNC_NAME); DEBUG_WAIT \
}} while( 0 )
#define SHOW_ERROR(seriousness, format, param...) \
do { if( seriousness <= debug_level_error && seriousness <= DEBUG_MAX_LEVEL_ERROR ) { \
dprintf( "%s%s: "format"\n", FUNC_NAME, param ); DEBUG_WAIT_ERROR \
dprintf("%s%s: " format "\n", FUNC_NAME, param ); DEBUG_WAIT_ERROR \
}} while( 0 )
#define SHOW_ERROR0(seriousness, format) \
do { if( seriousness <= debug_level_error && seriousness <= DEBUG_MAX_LEVEL_ERROR ) { \
dprintf( "%s%s: "format"\n", FUNC_NAME); DEBUG_WAIT_ERROR \
dprintf("%s%s: " format "\n", FUNC_NAME); DEBUG_WAIT_ERROR \
}} while( 0 )