Skip to content

Commit 612277a

Browse files
committed
validation: silence some warnings
1 parent dbbc0a9 commit 612277a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/scripts/validation_layer_generator.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,16 @@ def outputValidationSourceEnumValues(self):
261261
enum_value_validate += ' std::vector<GenValidUsageXrObjectInfo>& objects_info,\n'
262262
enum_value_validate += ' const %s value) {\n' % enum_tuple.name
263263
indent = 1
264+
enum_value_validate += self.writeIndent(indent)
265+
enum_value_validate += '(void)instance_info; // quiet warnings\n'
266+
enum_value_validate += self.writeIndent(indent)
267+
enum_value_validate += '(void)command_name; // quiet warnings\n'
268+
enum_value_validate += self.writeIndent(indent)
269+
enum_value_validate += '(void)validation_name; // quiet warnings\n'
270+
enum_value_validate += self.writeIndent(indent)
271+
enum_value_validate += '(void)item_name; // quiet warnings\n'
272+
enum_value_validate += self.writeIndent(indent)
273+
enum_value_validate += '(void)objects_info; // quiet warnings\n'
264274
checked_extension = ''
265275
if enum_tuple.ext_name and not self.isCoreExtensionName(enum_tuple.ext_name):
266276
checked_extension = enum_tuple.ext_name
@@ -2157,8 +2167,13 @@ def genValidateInputsFunc(self, cur_command):
21572167
pre_validate_func += self.writeIndent(indent)
21582168
pre_validate_func += 'GenValidUsageXrHandleInfo *gen_%s_info = info_with_instance.first;\n' % undecorate(first_param_tuple.name)
21592169
pre_validate_func += self.writeIndent(indent)
2170+
pre_validate_func += '(void)gen_%s_info; // quiet warnings\n' % undecorate(first_param_tuple.name)
2171+
pre_validate_func += self.writeIndent(indent)
21602172
pre_validate_func += 'GenValidUsageXrInstanceInfo *gen_instance_info = info_with_instance.second;\n'
21612173

2174+
pre_validate_func += self.writeIndent(indent)
2175+
pre_validate_func += '(void)gen_instance_info; // quiet warnings\n'
2176+
21622177
# If any of the associated handles has validation state tracking, get the
21632178
# appropriate struct setup for validation later in the function
21642179
valid_type_list = []
@@ -2401,6 +2416,7 @@ def genNextValidateFunc(self, cur_command, has_return, is_create, is_destroy, is
24012416
next_validate_func += ' auto info_with_instance = %s.getWithInstanceInfo(%s);\n' % (
24022417
self.makeInfoName(handle_type_name=first_handle_tuple.name), first_handle_name)
24032418
next_validate_func += ' GenValidUsageXrHandleInfo *gen_%s_info = info_with_instance.first;\n' % base_handle_name
2419+
next_validate_func += ' (void)gen_%s_info; // quiet warnings\n' % base_handle_name
24042420
next_validate_func += ' GenValidUsageXrInstanceInfo *gen_instance_info = info_with_instance.second;\n'
24052421
else:
24062422
next_validate_func += '#error("Bug")\n'

0 commit comments

Comments
 (0)