From bc8c7d615d95fbca5192912189c934510ee72a92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Fri, 10 May 2013 19:49:36 +0200 Subject: [PATCH] translate: fixes 64 bit warnings --- src/bin/translate.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/bin/translate.cpp b/src/bin/translate.cpp index 27969917c8..48de3954ad 100644 --- a/src/bin/translate.cpp +++ b/src/bin/translate.cpp @@ -131,21 +131,21 @@ print_translation_format(const translation_format &format) void TypeList::Add(uint32 type) { - fList.AddItem((void *)type, 0); + fList.AddItem((void *)(addr_t)type, 0); } bool TypeList::Remove(uint32 type) { - return fList.RemoveItem((void *)type); + return fList.RemoveItem((void *)(addr_t)type); } bool TypeList::FindType(uint32 type) { - return fList.IndexOf((void *)type) >= 0; + return fList.IndexOf((void *)(addr_t)type) >= 0; } @@ -155,7 +155,7 @@ TypeList::SetTo(TypeList &types) fList.MakeEmpty(); for (int32 i = 0; i < types.Count(); i++) - fList.AddItem((void *)types.TypeAt(i)); + fList.AddItem((void *)(addr_t)types.TypeAt(i)); } @@ -169,7 +169,7 @@ TypeList::Count() uint32 TypeList::TypeAt(int32 index) { - return (uint32)fList.ItemAt(index); + return (uint32)(addr_t)fList.ItemAt(index); } @@ -612,7 +612,8 @@ TranslateApp::ListTranslators(uint32 type) continue; } - printf("name: %s\ninfo: %s\nversion: %ld.%ld.%ld\n", name, info, + printf("name: %s\ninfo: %s\nversion: %" B_PRId32 ".%" B_PRId32 ".%" + B_PRId32 "\n", name, info, B_TRANSLATION_MAJOR_VERSION(version), B_TRANSLATION_MINOR_VERSION(version), B_TRANSLATION_REVISION_VERSION(version));