mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-09 12:00:05 +00:00
Fix some compiler warnings
This change primarily fixes some -Wconversion warnings from gcc, but also silences a warning triggered in glslang_tab.cpp, which is generated code from bison. There are still several GCC conversion warnings in Types.h due to the use of bit fields that will be resolved in a future change.
This commit is contained in:
parent
b820431a2c
commit
19d541a91d
@ -240,8 +240,8 @@ public:
|
||||
OperandParameters operands;
|
||||
|
||||
protected:
|
||||
int typePresent : 1;
|
||||
int resultPresent : 1;
|
||||
bool typePresent : 1;
|
||||
bool resultPresent : 1;
|
||||
};
|
||||
|
||||
// The set of objects that hold all the instruction/operand
|
||||
|
@ -25,7 +25,7 @@ Requested GL_ARB_gpu_shader_int64
|
||||
0:9 move second child to first child ( temp int16_t)
|
||||
0:9 'x' ( temp int16_t)
|
||||
0:9 Constant:
|
||||
0:9 0 (const int8_t)
|
||||
0:9 0 (const int16_t)
|
||||
0:10 Sequence
|
||||
0:10 move second child to first child ( temp int)
|
||||
0:10 'y' ( temp int)
|
||||
|
@ -134,6 +134,11 @@ add_library(MachineIndependent STATIC ${MACHINEINDEPENDENT_SOURCES} ${MACHINEIND
|
||||
set_property(TARGET MachineIndependent PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
set_property(TARGET MachineIndependent PROPERTY FOLDER glslang)
|
||||
|
||||
if (NOT MSVC)
|
||||
# -Wunused-but-set-variable is triggered in code generated by bison that we do not control. Turn this warning off, but only for the generated.
|
||||
set_source_files_properties(MachineIndependent/glslang_tab.cpp PROPERTIES COMPILE_FLAGS -Wno-unused-but-set-variable)
|
||||
endif()
|
||||
|
||||
glslang_add_build_info_dependency(MachineIndependent)
|
||||
|
||||
glslang_pch(MachineIndependent MachineIndependent/pch.h)
|
||||
|
@ -503,7 +503,7 @@ public:
|
||||
case EbtInt: returnValue.setIConst(iConst % constant.iConst); break;
|
||||
case EbtUint: returnValue.setUConst(uConst % constant.uConst); break;
|
||||
case EbtInt8: returnValue.setI8Const(i8Const % constant.i8Const); break;
|
||||
case EbtInt16: returnValue.setI8Const(i8Const % constant.i16Const); break;
|
||||
case EbtInt16: returnValue.setI16Const(i16Const % constant.i16Const); break;
|
||||
case EbtInt64: returnValue.setI64Const(i64Const % constant.i64Const); break;
|
||||
case EbtUint8: returnValue.setU8Const(u8Const % constant.u8Const); break;
|
||||
case EbtUint16: returnValue.setU16Const(u16Const % constant.u16Const); break;
|
||||
|
Loading…
Reference in New Issue
Block a user