64-bit printf warning fixes in libroot.

This commit is contained in:
Alex Smith 2012-07-28 13:40:09 +01:00
parent c3b03e5877
commit e453c0f4a7
5 changed files with 10 additions and 9 deletions

View File

@ -60,7 +60,7 @@ bool _rtDebugFlag = true;
void
debugger(const char *message)
{
debug_printf("%ld: DEBUGGER: %s\n", find_thread(NULL), message);
debug_printf("%" B_PRId32 ": DEBUGGER: %s\n", find_thread(NULL), message);
_kern_debugger(message);
}
@ -261,8 +261,8 @@ _debuggerAssert(const char *file, int line, const char *message)
"Assert failed: File: %s, Line: %d, %s",
file, line, message);
debug_printf("%ld: ASSERT: %s:%d %s\n", find_thread(NULL), file, line,
buffer);
debug_printf("%" B_PRId32 ": ASSERT: %s:%d %s\n", find_thread(NULL), file,
line, buffer);
_kern_debugger(buffer);
return 0;

View File

@ -76,8 +76,9 @@ init_after_fork(void)
sHeapArea = area_for((void*)sFreeHeapBase);
if (sHeapArea < 0) {
// Where is it gone?
debug_printf("hoard: init_after_fork(): thread %ld, Heap area not "
"found! Base address: %p\n", find_thread(NULL), sHeapBase);
debug_printf("hoard: init_after_fork(): thread %" B_PRId32 ", Heap "
"area not found! Base address: %p\n", find_thread(NULL),
sHeapBase);
exit(1);
}
}

View File

@ -37,8 +37,8 @@ ptsname(int masterFD)
static char buffer[32];
char letter = 'p';
snprintf(buffer, sizeof(buffer), "/dev/tt/%c%lx", char(letter + index / 16),
index % 16);
snprintf(buffer, sizeof(buffer), "/dev/tt/%c%" B_PRIx32,
char(letter + index / 16), index % 16);
return buffer;
}

View File

@ -41,7 +41,7 @@ uname(struct utsname *info)
strlcat(info->version, systemInfo.kernel_build_date, sizeof(info->version));
strlcat(info->version, " ", sizeof(info->version));
strlcat(info->version, systemInfo.kernel_build_time, sizeof(info->version));
snprintf(info->release, sizeof(info->release), "%lld",
snprintf(info->release, sizeof(info->release), "%" B_PRId64,
systemInfo.kernel_version);
// TODO: make this better

View File

@ -95,7 +95,7 @@ message_to_console(syslog_context *context, const char *text, va_list args)
if (context->ident[0])
fprintf(stderr, "'%s' ", context->ident);
if (context->options & LOG_PID)
fprintf(stderr, "[%ld] ", find_thread(NULL));
fprintf(stderr, "[%" B_PRId32 "] ", find_thread(NULL));
vfprintf(stderr, text, args);
fputc('\n', stderr);