diff --git a/Bindings/C/VXInstructionDecoderC.h b/Bindings/C/VXInstructionDecoderC.h index 1741630..e40e528 100644 --- a/Bindings/C/VXInstructionDecoderC.h +++ b/Bindings/C/VXInstructionDecoderC.h @@ -38,6 +38,7 @@ #include "VXDisassemblerTypesC.h" #include +#include #ifdef __cplusplus extern "C" @@ -46,7 +47,7 @@ extern "C" /* VXBaseDataSource ============================================================================ */ -typedef struct _VXBaseDataSourceContext {} VXBaseDataSourceContext; +typedef struct _VXBaseDataSourceContext { int a; } VXBaseDataSourceContext; void VXBaseDataSource_Release( VXBaseDataSourceContext *ctx); @@ -102,7 +103,7 @@ typedef enum _VXInstructionSetVendor /* : uint8_t */ /* VXInstructionDecoder ======================================================================== */ -typedef struct _VXInstructionDecoderContext {} VXInstructionDecoderContext; +typedef struct _VXInstructionDecoderContext { int a; } VXInstructionDecoderContext; VXInstructionDecoderContext* VXInstructionDecoder_Create(void); @@ -152,4 +153,4 @@ void VXInstructionDecoder_SetInstructionPointer( } #endif -#endif /* _VDE_VXINSTRUCTIONDECODERC_H_ */ \ No newline at end of file +#endif /* _VDE_VXINSTRUCTIONDECODERC_H_ */ diff --git a/Bindings/C/VXInstructionFormatterC.h b/Bindings/C/VXInstructionFormatterC.h index 3d120bf..66319ec 100644 --- a/Bindings/C/VXInstructionFormatterC.h +++ b/Bindings/C/VXInstructionFormatterC.h @@ -42,7 +42,7 @@ extern "C" /* VXBaseSymbolResolver ======================================================================== */ -typedef struct _VXBaseSymbolResolverContext {} VXBaseSymbolResolverContext; + typedef struct _VXBaseSymbolResolverContext { int a; } VXBaseSymbolResolverContext; VXBaseSymbolResolverContext* VXBaseSymbolResolver_Create(void); @@ -85,7 +85,7 @@ typedef const char* (*VXResolveSymbol_t)( /* VXBaseInstructionFormatter ================================================================== */ -typedef struct _VXBaseInstructionFormatterContext {} VXBaseInstructionFormatterContext; + typedef struct _VXBaseInstructionFormatterContext {int a;} VXBaseInstructionFormatterContext; VXBaseSymbolResolverContext* VXBaseInstructionFormatter_GetSymbolResolver( const VXBaseInstructionFormatterContext *ctx); @@ -98,7 +98,7 @@ void VXBaseInstructionFormatter_Release(VXBaseInstructionFormatterContext *ctx); /* VXIntelInstructionFormatter ================================================================ */ -typedef struct _VXIntelInstructionFormatterContext {} VXIntelInstructionFormatterContext; + typedef struct _VXIntelInstructionFormatterContext {int a;} VXIntelInstructionFormatterContext; VXBaseInstructionFormatterContext* VXIntelInstructionFormatter_Create(void); diff --git a/CMakeLists.txt b/CMakeLists.txt index bb9669f..b7ef67b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,12 +8,13 @@ option(BUILD_C_BINDINGS "Build C bindings" TRUE) # TODO: default to FALSE when r if (NOT CONFIGURED_ONCE) if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - set(compiler_specific "-std=c++0x -Werror") + set(compiler_specific "-Werror") + set(compiler_specific_cxx "-std=c++0x") elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") set(compiler_specific "/WX /D_CRT_SECURE_NO_WARNINGS") endif () - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${compiler_specific}" + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${compiler_specific} ${compiler_specific_cxx}" CACHE STRING "Flags used by the compiler during all build types." FORCE) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${compiler_specific}" CACHE STRING "Flags used by the compiler during all build types." FORCE) @@ -78,4 +79,4 @@ if (BUILD_EXAMPLES) endif () endif () -set(CONFIGURED_ONCE TRUE CACHE INTERNAL "CMake has configured at least once.") \ No newline at end of file +set(CONFIGURED_ONCE TRUE CACHE INTERNAL "CMake has configured at least once.") diff --git a/VerteronDisassemblerEngine/VXInstructionFormatter.h b/VerteronDisassemblerEngine/VXInstructionFormatter.h index f24b0a3..762eeab 100644 --- a/VerteronDisassemblerEngine/VXInstructionFormatter.h +++ b/VerteronDisassemblerEngine/VXInstructionFormatter.h @@ -33,6 +33,7 @@ #include #include +#include #include "VXDisassemblerTypes.h" namespace Verteron