summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/slang_compile.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-02-15 15:51:01 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-02-15 15:51:01 +0000
commita584e846d435070e67aff904fb79cfc9a6d7d05e (patch)
tree0518ce5ff48736d064c7f84aea87070b5e69a1af /src/mesa/shader/slang/slang_compile.c
parentdd02edf381a6bc68bad0cb881548db079aa706bb (diff)
Fix a few warnings:
- nested comments (use #if 0 / #endif instead) - missing default clause in switch statements - use of possibly undefined variables
Diffstat (limited to 'src/mesa/shader/slang/slang_compile.c')
-rw-r--r--src/mesa/shader/slang/slang_compile.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c
index eb02ccc1991..02850ebf129 100644
--- a/src/mesa/shader/slang/slang_compile.c
+++ b/src/mesa/shader/slang/slang_compile.c
@@ -1649,12 +1649,13 @@ static int parse_init_declarator (slang_parse_ctx *C, slang_output_ctx *O,
return 0;
}
if (!parse_expression (C, O, var->initializer))
- return 0;
+ return 0;
/* TODO: execute the initializer */
break;
-/* case VARIABLE_ARRAY_UNKNOWN:
+#if 0
+ case VARIABLE_ARRAY_UNKNOWN:
/* unsized array - mark it as array and copy the specifier to the array element */
-/* var->type.specifier.type = slang_spec_array;
+ var->type.specifier.type = slang_spec_array;
var->type.specifier._array = (slang_type_specifier *) slang_alloc_malloc (sizeof (
slang_type_specifier));
if (var->type.specifier._array == NULL)
@@ -1665,9 +1666,10 @@ static int parse_init_declarator (slang_parse_ctx *C, slang_output_ctx *O,
slang_type_specifier_construct (var->type.specifier._array);
if (!slang_type_specifier_copy (var->type.specifier._array, &type->specifier))
return 0;
- break;*/
- case VARIABLE_ARRAY_EXPLICIT:
- /* sized array - mark it as array, copy the specifier to the array element and
+ break;
+#endif
+ case VARIABLE_ARRAY_EXPLICIT:
+ /* sized array - mark it as array, copy the specifier to the array element and
* parse the expression */
var->type.specifier.type = slang_spec_array;
var->type.specifier._array = (slang_type_specifier *) slang_alloc_malloc (sizeof (