From 042650157a7d3fb02e0e436cd43665b5b1e67a75 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Fri, 27 Oct 2017 22:41:22 -0500 Subject: PSP: Fix strict aliasing violation Casting through pointer to void just to truncate a value to uint32 is incorrect. --- backends/fs/psp/psp-stream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends/fs') diff --git a/backends/fs/psp/psp-stream.cpp b/backends/fs/psp/psp-stream.cpp index 51720b54bf..8cefd414e4 100644 --- a/backends/fs/psp/psp-stream.cpp +++ b/backends/fs/psp/psp-stream.cpp @@ -99,7 +99,7 @@ SceUID PspIoStream::open() { // Get the file size. This way is much faster than going to the end of the file and back SceIoStat stat; sceIoGetstat(_path.c_str(), &stat); - _fileSize = *((uint32 *)(void *)&stat.st_size); // 4GB file (32 bits) is big enough for us + _fileSize = stat.st_size; // 4GB file (32 bits) is big enough for us PSP_DEBUG_PRINT("%s filesize[%d]\n", _path.c_str(), _fileSize); -- cgit v1.2.3