about summary refs log tree commit diff stats
path: root/src/emu
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-02-13 11:24:13 +0100
committerptitSeb <sebastien.chev@gmail.com>2023-02-13 11:24:13 +0100
commit9c8b663d5bc1f30717aa4d87cc63d1c9ebfa1c8e (patch)
tree138dc39b708378f56bf0a5a6ef6fa5e99c704b66 /src/emu
parent8309b63fb10cba69ef5374f9c2e5416369d84bb2 (diff)
downloadbox64-9c8b663d5bc1f30717aa4d87cc63d1c9ebfa1c8e.tar.gz
box64-9c8b663d5bc1f30717aa4d87cc63d1c9ebfa1c8e.zip
Various minor warning fixes
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/modrm.h2
-rwxr-xr-xsrc/emu/x64primop.c9
-rwxr-xr-xsrc/emu/x87emu_private.c4
3 files changed, 9 insertions, 6 deletions
diff --git a/src/emu/modrm.h b/src/emu/modrm.h
index d3ccd18c..c01343b0 100644
--- a/src/emu/modrm.h
+++ b/src/emu/modrm.h
@@ -11,7 +11,7 @@
 #ifdef DYNAREC

 #define STEP if(step) return 0;

 #define STEP2 if(step) {R_RIP = addr; return 0;}

-#define STEP3 if(*step) *(step)++;

+#define STEP3 if(*step) (*step)++;

 #else

 #define STEP

 #define STEP2

diff --git a/src/emu/x64primop.c b/src/emu/x64primop.c
index c45cb654..b0270491 100755
--- a/src/emu/x64primop.c
+++ b/src/emu/x64primop.c
@@ -1189,8 +1189,9 @@ uint16_t sbb16(x64emu_t *emu, uint16_t d, uint16_t s)
 
 	if (ACCESS_FLAG(F_CF))
         res = d - s - 1;
-    else
+    else {
         res = d - s;
+	}
    	CONDITIONAL_SET_FLAG(res & 0x8000, F_SF);
    	CONDITIONAL_SET_FLAG((res & 0xffff) == 0, F_ZF);
    	CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF);
@@ -1211,8 +1212,9 @@ uint32_t sbb32(x64emu_t *emu, uint32_t d, uint32_t s)
 
 	if (ACCESS_FLAG(F_CF))
         res = d - s - 1;
-    else
+    else {
         res = d - s;
+	}
   	CONDITIONAL_SET_FLAG(res & 0x80000000, F_SF);
   	CONDITIONAL_SET_FLAG(!res, F_ZF);
   	CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF);
@@ -1233,8 +1235,9 @@ uint64_t sbb64(x64emu_t *emu, uint64_t d, uint64_t s)
 
 	if (ACCESS_FLAG(F_CF))
         res = d - s - 1;
-    else
+    else {
         res = d - s;
+	}
   	CONDITIONAL_SET_FLAG(res & 0x8000000000000000LL, F_SF);
   	CONDITIONAL_SET_FLAG(!res, F_ZF);
   	CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF);
diff --git a/src/emu/x87emu_private.c b/src/emu/x87emu_private.c
index 7a16cd97..fc104557 100755
--- a/src/emu/x87emu_private.c
+++ b/src/emu/x87emu_private.c
@@ -201,7 +201,7 @@ void D2LD(void* d, void* ld)
 
 double FromLD(void* ld)
 {
-    double ret;
+    double ret = 0;
     LD2D(ld, &ret);
     return ret;
 }
@@ -210,7 +210,7 @@ double FromLD(void* ld)
 long double LD2localLD(void* ld)
 {
     // local implementation may not be try Quad precision, but double-double precision, so simple way to keep the 80bits precision in the conversion
-    double ret;
+    double ret = 0;
     LD2D(ld, &ret);
     return ret;
 }