From 1fd7b2f396fb5897f966016a735b8e97c5035e32 Mon Sep 17 00:00:00 2001 From: PulkoMandy Date: Sat, 21 Dec 2024 17:39:45 +0100 Subject: [PATCH] 3dfx driver: enable -Werror and fix warnings Change-Id: I8278dab0456dbad86c27e483fcb91a9c21d3f517 Reviewed-on: https://review.haiku-os.org/c/haiku/+/8701 Reviewed-by: Adrien Destugues --- build/jam/ArchitectureRules | 2 +- src/add-ons/kernel/drivers/graphics/3dfx/driver.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build/jam/ArchitectureRules b/build/jam/ArchitectureRules index d7d7940fc5..51686943f1 100644 --- a/build/jam/ArchitectureRules +++ b/build/jam/ArchitectureRules @@ -665,7 +665,7 @@ rule ArchitectureSetupWarnings architecture # EnableWerror src add-ons kernel drivers display ; EnableWerror src add-ons kernel drivers dvb ; # EnableWerror src add-ons kernel drivers graphics ; -# EnableWerror src add-ons kernel drivers graphics 3dfx ; + EnableWerror src add-ons kernel drivers graphics 3dfx ; EnableWerror src add-ons kernel drivers graphics ati ; EnableWerror src add-ons kernel drivers graphics et6x00 ; EnableWerror src add-ons kernel drivers graphics framebuffer ; diff --git a/src/add-ons/kernel/drivers/graphics/3dfx/driver.cpp b/src/add-ons/kernel/drivers/graphics/3dfx/driver.cpp index 02060fd012..3f9d5a9176 100644 --- a/src/add-ons/kernel/drivers/graphics/3dfx/driver.cpp +++ b/src/add-ons/kernel/drivers/graphics/3dfx/driver.cpp @@ -147,7 +147,7 @@ MapDevice(DeviceInfo& di) B_READ_AREA + B_WRITE_AREA, (void**)&si.videoMemAddr); - TRACE("Video memory, area: %ld, addr: 0x%lX, size: %ld\n", + TRACE("Video memory, area: %" B_PRId32 ", addr: 0x%" B_PRIx32 ", size: %" B_PRId32 "\n", si.videoMemArea, (uint32)(si.videoMemAddr), videoRamSize); if (si.videoMemArea < 0) { @@ -182,7 +182,7 @@ MapDevice(DeviceInfo& di) si.videoMemArea = -1; } - TRACE("leave MapDevice(); result: %ld\n", si.regsArea); + TRACE("leave MapDevice(); result: %" B_PRId32 "\n", si.regsArea); return si.regsArea; } @@ -354,7 +354,7 @@ init_driver(void) gDeviceNames[count] = NULL; // terminate list with null pointer - TRACE("init_driver() %ld supported devices\n", count); + TRACE("init_driver() %" B_PRIu32 " supported devices\n", count); return B_OK; } @@ -400,7 +400,7 @@ device_open(const char* name, uint32 /*flags*/, void** cookie) { status_t status = B_OK; - TRACE("device_open() - name: %s, cookie: 0x%08lx)\n", name, (uint32)cookie); + TRACE("device_open() - name: %s, cookie: %p)\n", name, cookie); // Find the device name in the list of devices. @@ -425,7 +425,7 @@ device_open(const char* name, uint32 /*flags*/, void** cookie) *cookie = &di; // send cookie to opener } - TRACE("device_open() returning 0x%lx, open count: %ld\n", status, + TRACE("device_open() returning 0x%" B_PRIx32 ", open count: %" B_PRIu32 "\n", status, di.openCount); return status; } @@ -491,7 +491,7 @@ device_free(void* dev) gLock.Release(); // unlock driver - TRACE("exit device_free() openCount: %ld\n", di.openCount); + TRACE("exit device_free() openCount: %" B_PRId32 "\n", di.openCount); return B_OK; }