diff options
author | Brian Paul <[email protected]> | 2010-08-11 13:59:45 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-08-11 15:06:12 -0600 |
commit | d1dda951c85f65612ed6fe080728f67fdc93d232 (patch) | |
tree | ef9a86e34902c4815ac1cd9dab7e811d477551d8 /src/glsl/glcpp/pp.c | |
parent | 6dc89d221d43fad5f3edbb903997160af071bec0 (diff) |
glsl2: move declarations before code
Diffstat (limited to 'src/glsl/glcpp/pp.c')
-rw-r--r-- | src/glsl/glcpp/pp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/glsl/glcpp/pp.c b/src/glsl/glcpp/pp.c index 7aa1a968de7..3adccf72aab 100644 --- a/src/glsl/glcpp/pp.c +++ b/src/glsl/glcpp/pp.c @@ -28,6 +28,8 @@ void glcpp_error (YYLTYPE *locp, glcpp_parser_t *parser, const char *fmt, ...) { + va_list ap; + parser->error = 1; parser->info_log = talloc_asprintf_append(parser->info_log, "%u:%u(%u): " @@ -35,7 +37,6 @@ glcpp_error (YYLTYPE *locp, glcpp_parser_t *parser, const char *fmt, ...) locp->source, locp->first_line, locp->first_column); - va_list ap; va_start(ap, fmt); parser->info_log = talloc_vasprintf_append(parser->info_log, fmt, ap); va_end(ap); @@ -45,13 +46,14 @@ glcpp_error (YYLTYPE *locp, glcpp_parser_t *parser, const char *fmt, ...) void glcpp_warning (YYLTYPE *locp, glcpp_parser_t *parser, const char *fmt, ...) { + va_list ap; + parser->info_log = talloc_asprintf_append(parser->info_log, "%u:%u(%u): " "preprocessor warning: ", locp->source, locp->first_line, locp->first_column); - va_list ap; va_start(ap, fmt); parser->info_log = talloc_vasprintf_append(parser->info_log, fmt, ap); va_end(ap); |