summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2015-02-03 12:40:16 -0500
committerGravatar bunnei2015-02-03 12:40:16 -0500
commitd64c836369ec2feae8a39c883a832692a8239bad (patch)
tree3c7d78bb2e4666cb7a11cfb7f57f61b8710ca07d /src
parentMerge pull request #523 from yuriks/kernel-lifetime5 (diff)
parentcore: Fix some warnings on OSX (diff)
downloadyuzu-d64c836369ec2feae8a39c883a832692a8239bad.tar.gz
yuzu-d64c836369ec2feae8a39c883a832692a8239bad.tar.xz
yuzu-d64c836369ec2feae8a39c883a832692a8239bad.zip
Merge pull request #532 from lioncash/warn
core: Fix some warnings on OSX
Diffstat (limited to 'src')
-rw-r--r--src/core/arm/dyncom/arm_dyncom_interpreter.cpp6
-rw-r--r--src/core/hle/kernel/kernel.cpp1
-rw-r--r--src/core/hw/gpu.cpp2
-rw-r--r--src/core/loader/loader.h2
4 files changed, 5 insertions, 6 deletions
diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
index 96d71cd50..3be13de0c 100644
--- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
+++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
@@ -3553,7 +3553,6 @@ static tdstate decode_thumb_instr(arm_processor *cpu, uint32_t inst, addr_t addr
3553 case 26: 3553 case 26:
3554 case 27: 3554 case 27:
3555 if (((tinstr & 0x0F00) != 0x0E00) && ((tinstr & 0x0F00) != 0x0F00)){ 3555 if (((tinstr & 0x0F00) != 0x0E00) && ((tinstr & 0x0F00) != 0x0F00)){
3556 u32 cond = (tinstr & 0x0F00) >> 8;
3557 inst_index = table_length - 4; 3556 inst_index = table_length - 4;
3558 *ptr_inst_base = arm_instruction_trans[inst_index](tinstr, inst_index); 3557 *ptr_inst_base = arm_instruction_trans[inst_index](tinstr, inst_index);
3559 } else { 3558 } else {
@@ -3693,6 +3692,9 @@ static bool InAPrivilegedMode(arm_core_t *core) {
3693} 3692}
3694 3693
3695unsigned InterpreterMainLoop(ARMul_State* state) { 3694unsigned InterpreterMainLoop(ARMul_State* state) {
3695 #undef RM
3696 #undef RS
3697
3696 #define CRn inst_cream->crn 3698 #define CRn inst_cream->crn
3697 #define OPCODE_2 inst_cream->opcode_2 3699 #define OPCODE_2 inst_cream->opcode_2
3698 #define CRm inst_cream->crm 3700 #define CRm inst_cream->crm
@@ -4999,7 +5001,7 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
4999 } 5001 }
5000 uint32_t byte_mask = (BIT(inst, 16) ? 0xff : 0) | (BIT(inst, 17) ? 0xff00 : 0) 5002 uint32_t byte_mask = (BIT(inst, 16) ? 0xff : 0) | (BIT(inst, 17) ? 0xff00 : 0)
5001 | (BIT(inst, 18) ? 0xff0000 : 0) | (BIT(inst, 19) ? 0xff000000 : 0); 5003 | (BIT(inst, 18) ? 0xff0000 : 0) | (BIT(inst, 19) ? 0xff000000 : 0);
5002 uint32_t mask; 5004 uint32_t mask = 0;
5003 if (!inst_cream->R) { 5005 if (!inst_cream->R) {
5004 if (InAPrivilegedMode(cpu)) { 5006 if (InAPrivilegedMode(cpu)) {
5005 if ((operand & StateMask) != 0) { 5007 if ((operand & StateMask) != 0) {
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index 7e0b9542e..52dca4dd8 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -97,7 +97,6 @@ ResultCode HandleTable::Close(Handle handle) {
97 return ERR_INVALID_HANDLE; 97 return ERR_INVALID_HANDLE;
98 98
99 size_t slot = GetSlot(handle); 99 size_t slot = GetSlot(handle);
100 u16 generation = GetGeneration(handle);
101 100
102 objects[slot] = nullptr; 101 objects[slot] = nullptr;
103 102
diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp
index 58eec3005..aad0e5d0d 100644
--- a/src/core/hw/gpu.cpp
+++ b/src/core/hw/gpu.cpp
@@ -202,8 +202,6 @@ template void Write<u8>(u32 addr, const u8 data);
202 202
203/// Update hardware 203/// Update hardware
204static void VBlankCallback(u64 userdata, int cycles_late) { 204static void VBlankCallback(u64 userdata, int cycles_late) {
205 auto& framebuffer_top = g_regs.framebuffer_config[0];
206
207 frame_count++; 205 frame_count++;
208 last_skip_frame = g_skip_frame; 206 last_skip_frame = g_skip_frame;
209 g_skip_frame = (frame_count & Settings::values.frame_skip) != 0; 207 g_skip_frame = (frame_count & Settings::values.frame_skip) != 0;
diff --git a/src/core/loader/loader.h b/src/core/loader/loader.h
index 7456b019b..3510c6b28 100644
--- a/src/core/loader/loader.h
+++ b/src/core/loader/loader.h
@@ -38,7 +38,7 @@ enum class ResultStatus {
38 ErrorMemoryAllocationFailed, 38 ErrorMemoryAllocationFailed,
39}; 39};
40 40
41static u32 MakeMagic(char a, char b, char c, char d) { 41static inline u32 MakeMagic(char a, char b, char c, char d) {
42 return a | b << 8 | c << 16 | d << 24; 42 return a | b << 8 | c << 16 | d << 24;
43} 43}
44 44