desklink: Fix %ld being used instead of B_PRId32

Also enables -Werror.
This commit is contained in:
Jonathan Schleifer 2014-03-27 16:46:57 +01:00
parent c8127e2b7d
commit 4626c49e32
3 changed files with 6 additions and 5 deletions

View File

@ -669,6 +669,7 @@ rule ArchitectureSetupWarnings architecture
EnableWerror src add-ons translators tiff ;
# EnableWerror src add-ons translators wonderbrush ;
EnableWerror src add-ons print ;
EnableWerror src bin desklink ;
EnableWerror src bin multiuser ;
EnableWerror src bin package ;
EnableWerror src bin package_repo ;

View File

@ -395,7 +395,7 @@ VolumeControl::UpdateText() const
if (!IsEnabled())
return NULL;
fText.SetToFormat(B_TRANSLATE("%ld dB"), Value());
fText.SetToFormat(B_TRANSLATE("%" B_PRId32 " dB"), Value());
return fText.String();
}

View File

@ -55,7 +55,7 @@ main(int, char **argv)
while (found < count) {
const char *name = NULL;
if (deskbar.GetItemInfo(j, &name) == B_OK) {
printf("Item %ld: '%s'\n", j, name);
printf("Item %" B_PRId32 ": '%s'\n", j, name);
free((void *)name);
found++;
}
@ -95,13 +95,13 @@ main(int, char **argv)
while (deskbar.GetItemInfo(replicant.String(), &found_id) == B_OK) {
err = deskbar.RemoveItem(found_id);
if (err != B_OK) {
printf("desklink: Error removing replicant id %ld: %s\n",
found_id, strerror(err));
printf("desklink: Error removing replicant id "
"%" B_PRId32 ": %s\n", found_id, strerror(err));
break;
}
found++;
}
printf("Removed %ld items.\n", found);
printf("Removed %" B_PRId32 " items.\n", found);
return err;
}