base: fix warnings

This commit is contained in:
luboslenco
2026-05-22 07:57:44 +02:00
parent 6698870b46
commit eeeae64a36
3 changed files with 59 additions and 34 deletions
+27 -17
View File
@@ -6033,10 +6033,12 @@ void indent(char *code, size_t *offset, int indentation) {
*offset += sprintf(&code[*offset], "%s", str);
}
#ifdef IRON_METAL
extern size_t vertex_inputs_size;
extern size_t fragment_inputs_size;
extern size_t vertex_functions_size;
extern size_t fragment_functions_size;
#endif
uint64_t _next_variable_id;
size_t _allocated_globals_size;
@@ -6090,33 +6092,41 @@ void gpu_create_shaders_from_kong(char *kong, char **vs, char **fs, int *vs_size
types_init();
functions_init();
_next_variable_id = next_variable_id;
_allocated_globals_size = allocated_globals_size;
_next_function_index = next_function_index;
_globals_size = globals_size;
_names_index = names_index;
_sets_count = sets_count;
_next_type_index = next_type_index;
_next_variable_id = next_variable_id;
_allocated_globals_size = allocated_globals_size;
_next_function_index = next_function_index;
_globals_size = globals_size;
_names_index = names_index;
_sets_count = sets_count;
_next_type_index = next_type_index;
#ifdef IRON_METAL
_vertex_inputs_size = vertex_inputs_size;
_fragment_inputs_size = fragment_inputs_size;
_vertex_functions_size = vertex_functions_size;
_fragment_functions_size = fragment_functions_size;
_hash = _clone_hash(hash);
_expression_index = expression_index;
_statement_index = statement_index;
#endif
_hash = _clone_hash(hash);
_expression_index = expression_index;
_statement_index = statement_index;
}
else {
next_variable_id = _next_variable_id;
allocated_globals_size = _allocated_globals_size;
next_function_index = _next_function_index;
globals_size = _globals_size;
names_index = _names_index;
sets_count = _sets_count;
next_type_index = _next_type_index;
next_variable_id = _next_variable_id;
allocated_globals_size = _allocated_globals_size;
next_function_index = _next_function_index;
globals_size = _globals_size;
names_index = _names_index;
sets_count = _sets_count;
next_type_index = _next_type_index;
#ifdef IRON_METAL
vertex_inputs_size = _vertex_inputs_size;
fragment_inputs_size = _fragment_inputs_size;
vertex_functions_size = _vertex_functions_size;
fragment_functions_size = _fragment_functions_size;
#endif
shfree(hash);
hash = _clone_hash(_hash);
expression_index = _expression_index;