mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-10 21:40:43 +00:00
Various small warning fixes
-Indentation warnings -prevent shift overflow -This was declared extern in all contexts. Remove this for initialization -Fix main return types. OH CANADA! -Silence extraneos 'unused expression' warning -Force use return value (warning) -Remove tautological compare copy-pasta (char always < 256)
This commit is contained in:
parent
948c1df969
commit
232a35b6fc
@ -1394,7 +1394,10 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context)
|
||||
}
|
||||
|
||||
// Reschedule
|
||||
cpu->test_stopped();
|
||||
if (cpu->test_stopped())
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
if (Emu.IsStopped())
|
||||
{
|
||||
@ -1692,7 +1695,7 @@ const bool s_exception_handler_set = []() -> bool
|
||||
#endif
|
||||
|
||||
// TODO
|
||||
extern atomic_t<u32> g_thread_count(0);
|
||||
atomic_t<u32> g_thread_count(0);
|
||||
|
||||
thread_local DECLARE(thread_ctrl::g_tls_this_thread) = nullptr;
|
||||
|
||||
|
@ -144,9 +144,9 @@ error_code cellOskDialogLoadAsync(u32 container, vm::ptr<CellOskDialogParam> dia
|
||||
vm::ptr<u16> string_to_send = vm::cast(vm::alloc(CELL_OSKDIALOG_STRING_SIZE * 2, vm::main));
|
||||
atomic_t<bool> done = false;
|
||||
u32 return_value;
|
||||
u32 i = 0;
|
||||
u32 i;
|
||||
|
||||
for (i; i < CELL_OSKDIALOG_STRING_SIZE - 1; i++)
|
||||
for (i = 0; i < CELL_OSKDIALOG_STRING_SIZE - 1; i++)
|
||||
{
|
||||
string_to_send[i] = osk->osk_text[i];
|
||||
if (osk->osk_text[i] == 0) break;
|
||||
|
@ -64,13 +64,17 @@ s32 cellAANAddData(u32 aan_handle, u32 aan_port, u32 offset, vm::ptr<float> addr
|
||||
switch (type)
|
||||
{
|
||||
case CELL_SURMIXER_CHSTRIP_TYPE1A:
|
||||
if (port >= g_surmx.ch_strips_1) type = 0; break;
|
||||
if (port >= g_surmx.ch_strips_1) type = 0;
|
||||
break;
|
||||
case CELL_SURMIXER_CHSTRIP_TYPE2A:
|
||||
if (port >= g_surmx.ch_strips_2) type = 0; break;
|
||||
if (port >= g_surmx.ch_strips_2) type = 0;
|
||||
break;
|
||||
case CELL_SURMIXER_CHSTRIP_TYPE6A:
|
||||
if (port >= g_surmx.ch_strips_6) type = 0; break;
|
||||
if (port >= g_surmx.ch_strips_6) type = 0;
|
||||
break;
|
||||
case CELL_SURMIXER_CHSTRIP_TYPE8A:
|
||||
if (port >= g_surmx.ch_strips_8) type = 0; break;
|
||||
if (port >= g_surmx.ch_strips_8) type = 0;
|
||||
break;
|
||||
default:
|
||||
type = 0; break;
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ std::u16string ascii8_to_utf16(const std::string& ascii_string)
|
||||
|
||||
for (const auto& code : ascii_string)
|
||||
{
|
||||
out.push_back(code > 0xFF ? '#' : (char16_t)code);
|
||||
out.push_back((char16_t)code);
|
||||
}
|
||||
|
||||
out.push_back(0);
|
||||
|
@ -52,7 +52,7 @@ namespace vk
|
||||
u64 get_renderpass_key(const std::vector<vk::image*>& images, u64 previous_key)
|
||||
{
|
||||
// Partial update; assumes compatible renderpass keys
|
||||
const u64 layout_mask = (0x7FFF << 22);
|
||||
const u64 layout_mask = (0x7FFFull << 22);
|
||||
|
||||
u64 key = previous_key & ~layout_mask;
|
||||
u64 layout_offset = 22;
|
||||
|
@ -131,10 +131,8 @@ int main(int argc, char** argv)
|
||||
parser.process(app);
|
||||
|
||||
// Don't start up the full rpcs3 gui if we just want the version or help.
|
||||
if (parser.isSet(versionOption))
|
||||
return true;
|
||||
if (parser.isSet(helpOption))
|
||||
return true;
|
||||
if (parser.isSet(versionOption) || parser.isSet(helpOption))
|
||||
return 0;
|
||||
|
||||
app.Init();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user