mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	Merge pull request #1576 from smspillaz/fix-build-errors-03272016
Fix various build errors encountered on Clang 3.9 on OS X
This commit is contained in:
		
						commit
						0964a3ff53
					
				
					 9 changed files with 29 additions and 9 deletions
				
			
		|  | @ -21,7 +21,7 @@ target_link_libraries(citra ${SDL2_LIBRARY} ${OPENGL_gl_LIBRARY} inih glad) | |||
| if (MSVC) | ||||
|     target_link_libraries(citra getopt) | ||||
| endif() | ||||
| target_link_libraries(citra ${PLATFORM_LIBRARIES}) | ||||
| target_link_libraries(citra ${PLATFORM_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) | ||||
| 
 | ||||
| if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|FreeBSD|OpenBSD|NetBSD") | ||||
|     install(TARGETS citra RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") | ||||
|  |  | |||
|  | @ -346,5 +346,11 @@ u32 GraphicsFramebufferWidget::BytesPerPixel(GraphicsFramebufferWidget::Format f | |||
|         case Format::RGBA4: | ||||
|         case Format::D16: | ||||
|             return 2; | ||||
|         default: | ||||
|             UNREACHABLE_MSG("GraphicsFramebufferWidget::BytesPerPixel: this " | ||||
|                             "should not be reached as this function should " | ||||
|                             "be given a format which is in " | ||||
|                             "GraphicsFramebufferWidget::Format. Instead got %i", | ||||
|                             static_cast<int>(format)); | ||||
|     } | ||||
| } | ||||
|  |  | |||
|  | @ -39,6 +39,7 @@ static void assert_noinline_call(const Fn& fn) { | |||
|     }); } while (0) | ||||
| 
 | ||||
| #define UNREACHABLE() ASSERT_MSG(false, "Unreachable code!") | ||||
| #define UNREACHABLE_MSG(_a_, ...) ASSERT_MSG(false, _a_, __VA_ARGS__) | ||||
| 
 | ||||
| #ifdef _DEBUG | ||||
| #define DEBUG_ASSERT(_a_) ASSERT(_a_) | ||||
|  | @ -49,3 +50,4 @@ static void assert_noinline_call(const Fn& fn) { | |||
| #endif | ||||
| 
 | ||||
| #define UNIMPLEMENTED() DEBUG_ASSERT_MSG(false, "Unimplemented code!") | ||||
| #define UNIMPLEMENTED_MSG(_a_, ...) ASSERT_MSG(false, _a_, __VA_ARGS__) | ||||
|  | @ -529,7 +529,7 @@ static void ReadRegister() { | |||
|         id |= HexCharToValue(command_buffer[2]); | ||||
|     } | ||||
| 
 | ||||
|     if (id >= R0_REGISTER && id <= R15_REGISTER) { | ||||
|     if (id <= R15_REGISTER) { | ||||
|         IntToGdbHex(reply, Core::g_app_core->GetReg(id)); | ||||
|     } else if (id == CPSR_REGISTER) { | ||||
|         IntToGdbHex(reply, Core::g_app_core->GetCPSR()); | ||||
|  | @ -584,7 +584,7 @@ static void WriteRegister() { | |||
|         id |= HexCharToValue(command_buffer[2]); | ||||
|     } | ||||
| 
 | ||||
|     if (id >= R0_REGISTER && id <= R15_REGISTER) { | ||||
|     if (id <= R15_REGISTER) { | ||||
|         Core::g_app_core->SetReg(id, GdbHexToInt(buffer_ptr)); | ||||
|     } else if (id == CPSR_REGISTER) { | ||||
|         Core::g_app_core->SetCPSR(GdbHexToInt(buffer_ptr)); | ||||
|  |  | |||
|  | @ -250,7 +250,7 @@ static void CreateFile(Service::Interface* self) { | |||
| 
 | ||||
|     FileSys::Path file_path(filename_type, filename_size, filename_ptr); | ||||
| 
 | ||||
|     LOG_DEBUG(Service_FS, "type=%d size=%llu data=%s", filename_type, filename_size, file_path.DebugStr().c_str()); | ||||
|     LOG_DEBUG(Service_FS, "type=%d size=%llu data=%s", filename_type, file_size, file_path.DebugStr().c_str()); | ||||
| 
 | ||||
|     cmd_buff[1] = CreateFileInArchive(archive_handle, file_path, file_size).raw; | ||||
| } | ||||
|  |  | |||
|  | @ -255,7 +255,7 @@ ResultStatus AppLoader_NCCH::Load() { | |||
|     resource_limit_category = exheader_header.arm11_system_local_caps.resource_limit_category; | ||||
| 
 | ||||
|     LOG_INFO(Loader,  "Name:                        %s"    , exheader_header.codeset_info.name); | ||||
|     LOG_INFO(Loader,  "Program ID:                  %016X" , ncch_header.program_id); | ||||
|     LOG_INFO(Loader,  "Program ID:                  %016llX" , ncch_header.program_id); | ||||
|     LOG_DEBUG(Loader, "Code compressed:             %s"    , is_compressed ? "yes" : "no"); | ||||
|     LOG_DEBUG(Loader, "Entry point:                 0x%08X", entry_point); | ||||
|     LOG_DEBUG(Loader, "Code size:                   0x%08X", code_size); | ||||
|  |  | |||
|  | @ -747,8 +747,13 @@ struct Regs { | |||
|         case LightingSampler::ReflectGreen: | ||||
|         case LightingSampler::ReflectBlue: | ||||
|             return (config == LightingConfig::Config4) || (config == LightingConfig::Config5) || (config == LightingConfig::Config7); | ||||
|         default: | ||||
|             UNREACHABLE_MSG("Regs::IsLightingSamplerSupported: Reached " | ||||
|                             "unreachable section, sampler should be one " | ||||
|                             "of Distribution0, Distribution1, Fresnel, " | ||||
|                             "ReflectRed, ReflectGreen or ReflectBlue, instead " | ||||
|                             "got %i", static_cast<int>(config)); | ||||
|         } | ||||
|         return false; | ||||
|     } | ||||
| 
 | ||||
|     struct { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue