aboutsummaryrefslogtreecommitdiff
path: root/src/GPU3D_Soft.h
diff options
context:
space:
mode:
authorJesse Talavera <jesse@jesse.tg>2023-12-28 08:54:31 -0500
committerGitHub <noreply@github.com>2023-12-28 14:54:31 +0100
commita4b2b0c40df15713a5efa114310bf78fd369d0f4 (patch)
tree612c66b66a908bf7a91ecefcc61ba5971b3455fe /src/GPU3D_Soft.h
parent6d0de509c4f5f38198653be9b751c513a0a457a4 (diff)
Resolve or silence some warnings (#1905)
* Resolve some warnings - Their frequent appearance in the build logs is driving me nuts * Silence warnings about `offsetof` * Don't apply `-Wno-invalid-offset` to C, only to C++
Diffstat (limited to 'src/GPU3D_Soft.h')
-rw-r--r--src/GPU3D_Soft.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/GPU3D_Soft.h b/src/GPU3D_Soft.h
index 8fb4201..de65944 100644
--- a/src/GPU3D_Soft.h
+++ b/src/GPU3D_Soft.h
@@ -178,7 +178,7 @@ private:
{
// Z-buffering: linear interpolation
// still doesn't quite match hardware...
- s32 base, disp, factor;
+ s32 base = 0, disp = 0, factor = 0;
if (z0 < z1)
{
@@ -337,7 +337,7 @@ private:
constexpr s32 XVal() const
{
- s32 ret;
+ s32 ret = 0;
if (Negative) ret = x0 - (dx >> 18);
else ret = x0 + (dx >> 18);