소스 검색

gdbstub: Silence value truncation warning within FpuWrite()

Previously this would cause an implicit truncation warning about
assigning a u64 value to a u32 value without an explicit cast.
Lioncash 7 년 전
부모
커밋
474c745502
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/core/gdbstub/gdbstub.cpp

+ 1 - 1
src/core/gdbstub/gdbstub.cpp

@@ -282,7 +282,7 @@ static void FpuWrite(std::size_t id, u128 val, Kernel::Thread* thread = nullptr)
     if (id >= UC_ARM64_REG_Q0 && id < FPCR_REGISTER) {
         thread_context.vector_registers[id - UC_ARM64_REG_Q0] = val;
     } else if (id == FPCR_REGISTER) {
-        thread_context.fpcr = val[0];
+        thread_context.fpcr = static_cast<u32>(val[0]);
     }
 }