hey: fixes 64 bit warnings
This commit is contained in:
+26
-16
@@ -164,11 +164,16 @@ parse(BMessenger& the_application, int argc, char *argv[], int32 argapp)
|
|||||||
} else {
|
} else {
|
||||||
if (the_reply.what == (uint32)B_MESSAGE_NOT_UNDERSTOOD || the_reply.what==(uint32)B_ERROR){ // I do it myself
|
if (the_reply.what == (uint32)B_MESSAGE_NOT_UNDERSTOOD || the_reply.what==(uint32)B_ERROR){ // I do it myself
|
||||||
if (the_reply.HasString("message")){
|
if (the_reply.HasString("message")){
|
||||||
if (!silent)
|
if (!silent) {
|
||||||
printf("%s (error 0x%8lX)\n", the_reply.FindString("message"), the_reply.FindInt32("error"));
|
printf("%s (error 0x%8" B_PRIx32 ")\n",
|
||||||
|
the_reply.FindString("message"),
|
||||||
|
the_reply.FindInt32("error"));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!silent)
|
if (!silent) {
|
||||||
printf("error 0x%8lX\n", the_reply.FindInt32("error"));
|
printf("error 0x%8" B_PRIx32 "\n",
|
||||||
|
the_reply.FindInt32("error"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
@@ -187,7 +192,7 @@ parse(BMessenger& the_application, int argc, char *argv[], int32 argapp)
|
|||||||
} else if(tc==B_INT32_TYPE){
|
} else if(tc==B_INT32_TYPE){
|
||||||
int32 v;
|
int32 v;
|
||||||
the_reply.FindInt32("result", &v);
|
the_reply.FindInt32("result", &v);
|
||||||
printf("%ld\n", v);
|
printf("%" B_PRId32 "\n", v);
|
||||||
} else if(tc==B_UINT8_TYPE){
|
} else if(tc==B_UINT8_TYPE){
|
||||||
uint8 v;
|
uint8 v;
|
||||||
the_reply.FindInt8("result", (int8*)&v);
|
the_reply.FindInt8("result", (int8*)&v);
|
||||||
@@ -199,7 +204,7 @@ parse(BMessenger& the_application, int argc, char *argv[], int32 argapp)
|
|||||||
} else if(tc==B_UINT32_TYPE){
|
} else if(tc==B_UINT32_TYPE){
|
||||||
uint32 v;
|
uint32 v;
|
||||||
the_reply.FindInt32("result", (int32*)&v);
|
the_reply.FindInt32("result", (int32*)&v);
|
||||||
printf("%lu\n", v);
|
printf("%" B_PRIu32 "\n", v);
|
||||||
} else if(tc==B_STRING_TYPE){
|
} else if(tc==B_STRING_TYPE){
|
||||||
const char* v;
|
const char* v;
|
||||||
the_reply.FindString("result", &v);
|
the_reply.FindString("result", &v);
|
||||||
@@ -288,8 +293,8 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
be_roster->GetAppList(&team_list);
|
be_roster->GetAppList(&team_list);
|
||||||
|
|
||||||
for (int32 i=0; i<team_list.CountItems(); i++){
|
for (int32 i = 0; i < team_list.CountItems(); i++){
|
||||||
teamid = (team_id)team_list.ItemAt(i);
|
teamid = (team_id)(addr_t)team_list.ItemAt(i);
|
||||||
be_roster->GetRunningAppInfo(teamid, &appinfo);
|
be_roster->GetRunningAppInfo(teamid, &appinfo);
|
||||||
if (strcmp(appinfo.signature, argv[argapp])==0){
|
if (strcmp(appinfo.signature, argv[argapp])==0){
|
||||||
the_application=BMessenger(appinfo.signature);
|
the_application=BMessenger(appinfo.signature);
|
||||||
@@ -479,7 +484,7 @@ Hey(BMessenger* target, char* argv[], int32* argx, int32 argc, BMessage* reply)
|
|||||||
// if all goes well, rply contains all kinds of property infos
|
// if all goes well, rply contains all kinds of property infos
|
||||||
int32 j=0;
|
int32 j=0;
|
||||||
void *voidptr;
|
void *voidptr;
|
||||||
int32 sizefound;
|
ssize_t sizefound;
|
||||||
BPropertyInfo propinfo;
|
BPropertyInfo propinfo;
|
||||||
const value_info *vinfo;
|
const value_info *vinfo;
|
||||||
int32 vinfo_index, vinfo_count;
|
int32 vinfo_index, vinfo_count;
|
||||||
@@ -958,8 +963,9 @@ void
|
|||||||
add_message_contents(BList *textlist, BMessage *msg, int32 level)
|
add_message_contents(BList *textlist, BMessage *msg, int32 level)
|
||||||
{
|
{
|
||||||
int32 count;
|
int32 count;
|
||||||
int32 i, sizefound, j;
|
int32 i, j;
|
||||||
ulong typefound;
|
type_code typefound;
|
||||||
|
ssize_t sizefound;
|
||||||
#ifdef HAIKU_TARGET_PLATFORM_DANO
|
#ifdef HAIKU_TARGET_PLATFORM_DANO
|
||||||
const char *namefound;
|
const char *namefound;
|
||||||
#else
|
#else
|
||||||
@@ -1178,14 +1184,15 @@ format_data(int32 type, char *ptr, long size)
|
|||||||
case B_INT64_TYPE:
|
case B_INT64_TYPE:
|
||||||
str = new char[64];
|
str = new char[64];
|
||||||
i64 = *(int64*)ptr;
|
i64 = *(int64*)ptr;
|
||||||
sprintf(str, "%Ld (0x%LX)", i64, i64);
|
sprintf(str, "%" B_PRId64 " (0x%" B_PRIx64 ")", i64, i64);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case B_SIZE_T_TYPE:
|
case B_SIZE_T_TYPE:
|
||||||
case B_INT32_TYPE:
|
case B_INT32_TYPE:
|
||||||
str = new char[64];
|
str = new char[64];
|
||||||
i32 = *(int32*)ptr;
|
i32 = *(int32*)ptr;
|
||||||
sprintf(str, "%ld (0x%08lX)", i32, i32);
|
sprintf(str, "%" B_PRId32 " (0x%08" B_PRId32 ")", i32,
|
||||||
|
i32);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case B_INT16_TYPE:
|
case B_INT16_TYPE:
|
||||||
@@ -1204,13 +1211,15 @@ format_data(int32 type, char *ptr, long size)
|
|||||||
case B_UINT64_TYPE:
|
case B_UINT64_TYPE:
|
||||||
str = new char[64];
|
str = new char[64];
|
||||||
ui64 = *(uint64*)ptr;
|
ui64 = *(uint64*)ptr;
|
||||||
sprintf(str, "%Lu (0x%LX)", ui64, ui64);
|
sprintf(str, "%" B_PRIu64 " (0x%" B_PRIx64 ")", ui64,
|
||||||
|
ui64);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case B_UINT32_TYPE:
|
case B_UINT32_TYPE:
|
||||||
str = new char[64];
|
str = new char[64];
|
||||||
ui32 = *(uint32*)ptr;
|
ui32 = *(uint32*)ptr;
|
||||||
sprintf(str, "%lu (0x%08lX)", ui32, ui32);
|
sprintf(str, "%" B_PRIu32 " (0x%08" B_PRIx32 ")", ui32,
|
||||||
|
ui32);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case B_UINT16_TYPE:
|
case B_UINT16_TYPE:
|
||||||
@@ -1394,7 +1403,8 @@ format_data(int32 type, char *ptr, long size)
|
|||||||
strcat(str, vinfo[vinfo_index].name);
|
strcat(str, vinfo[vinfo_index].name);
|
||||||
strcat(str, " ");
|
strcat(str, " ");
|
||||||
|
|
||||||
sprintf(str+strlen(str), "0x%8lX (", vinfo[vinfo_index].value);
|
sprintf(str+strlen(str), "0x%8" B_PRIx32 " (",
|
||||||
|
vinfo[vinfo_index].value);
|
||||||
id_to_string(vinfo[vinfo_index].value, str+strlen(str));
|
id_to_string(vinfo[vinfo_index].value, str+strlen(str));
|
||||||
strcat(str, ")");
|
strcat(str, ")");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user