HaikuDepot: appease gcc2

Change-Id: I8dea214e9f2e9aff61f417232dba215e866e6978
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10966
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Máximo Castañeda <[email protected]>
This commit is contained in:
Máximo Castañeda
2026-05-08 14:38:15 +00:00
parent 37246ea447
commit 3c363dcc54
2 changed files with 10 additions and 6 deletions
@@ -82,12 +82,12 @@ UserRatingSummary::SetRatingByStar(int star, int ratingCount)
fRatingCountNoStar = ratingCount; fRatingCountNoStar = ratingCount;
if (ratingCount < 0) { if (ratingCount < 0) {
HDERROR("bad rating count %" B_PRId32, ratingCount); HDERROR("bad rating count %d", ratingCount);
return; return;
} }
if (star < RATING_MISSING_STAR || star > 5) { if (star < RATING_MISSING_STAR || star > 5) {
HDERROR("bad star %" B_PRId32, star); HDERROR("bad star %d", star);
return; return;
} }
@@ -194,7 +194,7 @@ UserRatingSummaryBuilder&
UserRatingSummaryBuilder::AddRatingByStar(int star, int ratingCount) UserRatingSummaryBuilder::AddRatingByStar(int star, int ratingCount)
{ {
if (star < RATING_MISSING_STAR || star > 5) { if (star < RATING_MISSING_STAR || star > 5) {
HDERROR("bad star %" B_PRId32 " in builder", star); HDERROR("bad star %d in builder", star);
return *this; return *this;
} }
+7 -3
View File
@@ -1066,7 +1066,9 @@ public:
if (userRatingInfo.IsSet()) if (userRatingInfo.IsSet())
count = userRatingInfo->CountUserRatings(); count = userRatingInfo->CountUserRatings();
BString packageName = package.IsSet() ? package->Name() : ""; BString packageName;
if (package.IsSet())
packageName = package->Name();
fAmPopulating = fAmPopulating && (packageName == fPackageName) && count == 0; fAmPopulating = fAmPopulating && (packageName == fPackageName) && count == 0;
if (count == 0) { if (count == 0) {
@@ -1251,7 +1253,9 @@ public:
changelog = localizedText->Changelog(); changelog = localizedText->Changelog();
} }
BString packageName = package.IsSet() ? package->Name() : ""; BString packageName;
if (package.IsSet())
packageName = package->Name();
fAmPopulating = fAmPopulating && (packageName == fPackageName) && changelog.Length() == 0; fAmPopulating = fAmPopulating && (packageName == fPackageName) && changelog.Length() == 0;
if (changelog.Length() > 0) { if (changelog.Length() > 0) {
@@ -1726,7 +1730,7 @@ PackageInfoView::HandleIconsChanged()
void void
PackageInfoView::HandleScreenshotCached(const ScreenshotCoordinate& coordinate) PackageInfoView::HandleScreenshotCached(const ScreenshotCoordinate& coordinate)
{ {
HDINFO("handle screenshot cached [%s] %" B_PRIu16 " x %" B_PRIu16, coordinate.Code().String(), HDINFO("handle screenshot cached [%s] %" B_PRIu32 " x %" B_PRIu32, coordinate.Code().String(),
coordinate.Width(), coordinate.Height()); coordinate.Width(), coordinate.Height());
_HandleScreenshotCached(fPackage, coordinate); _HandleScreenshotCached(fPackage, coordinate);
} }