aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_debug.c
diff options
context:
space:
mode:
authorJoakim Sindholt <[email protected]>2009-10-05 19:25:04 +0200
committerJoakim Sindholt <[email protected]>2009-10-05 19:25:04 +0200
commit1f39d59a2996e2acf6893a8dd1a0293bd8790cc2 (patch)
treee675586dd2c3be3fa72bd22a7a8c12fea7059b85 /src/gallium/drivers/r300/r300_debug.c
parent6971be783b970f882e873fa40e2dccde4137201f (diff)
r300g: fix scons build
So I didn't touch r300compiler, but r300g now compiles after having declarations and code untangled. As nha so gently points out, we shouldn't have to do this just to comply with MSVC compilers.
Diffstat (limited to 'src/gallium/drivers/r300/r300_debug.c')
-rw-r--r--src/gallium/drivers/r300/r300_debug.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/r300/r300_debug.c b/src/gallium/drivers/r300/r300_debug.c
index 15308dda1de..85d69c07479 100644
--- a/src/gallium/drivers/r300/r300_debug.c
+++ b/src/gallium/drivers/r300/r300_debug.c
@@ -48,6 +48,8 @@ void r300_init_debug(struct r300_context * ctx)
{
const char * options = debug_get_option("RADEON_DEBUG", 0);
boolean printhint = false;
+ size_t length;
+ struct debug_option * opt;
if (options) {
while(*options) {
@@ -56,8 +58,7 @@ void r300_init_debug(struct r300_context * ctx)
continue;
}
- size_t length = strcspn(options, " ,");
- struct debug_option * opt;
+ length = strcspn(options, " ,");
for(opt = debug_options; opt->name; ++opt) {
if (!strncmp(options, opt->name, length)) {
@@ -81,7 +82,7 @@ void r300_init_debug(struct r300_context * ctx)
if (printhint || ctx->debug & DBG_HELP) {
debug_printf("You can enable debug output by setting the RADEON_DEBUG environment variable\n"
"to a comma-separated list of debug options. Available options are:\n");
- for(struct debug_option * opt = debug_options; opt->name; ++opt) {
+ for(opt = debug_options; opt->name; ++opt) {
debug_printf(" %s: %s\n", opt->name, opt->description);
}
}