diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2006-07-26 19:52:28 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2006-07-26 19:52:28 +0000 |
| commit | 500d7616fd16005f6f8eea0a061160177160ec34 (patch) | |
| tree | 82b94a770435329debf353ada5176c16d185cbd5 /fluid/code.cxx | |
| parent | 9ee02e0f013398536b61f08dd3ced4188cd559bb (diff) | |
Revamp variable tests so that we rarely need to provide "o" and
"w" variables. This eliminates most of the "variable is shadowed"
warnings from GCC we get after creating .cxx files from FLUID.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5266 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid/code.cxx')
| -rw-r--r-- | fluid/code.cxx | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/fluid/code.cxx b/fluid/code.cxx index 25f68fc45..597f77ef3 100644 --- a/fluid/code.cxx +++ b/fluid/code.cxx @@ -3,7 +3,7 @@ // // Code output routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2005 by Bill Spitzak and others. +// Copyright 1998-2006 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -153,15 +153,8 @@ int write_declare(const char *format, ...) { //////////////////////////////////////////////////////////////// -// silly thing to prevent declaring unused variables: -// When this symbol is on, all attempts to write code don't write -// anything, but set a variable if it looks like the varaible "o" is used: -int varused_test; -int varused; - // write an array of C characters (adds a null): void write_cstring(const char *w, int length) { - if (varused_test) return; const char *e = w+length; int linelength = 1; putc('\"', code_file); @@ -228,7 +221,6 @@ void write_cstring(const char *w) {write_cstring(w,strlen(w));} // write an array of C binary data (does not add a null): void write_cdata(const char *s, int length) { - if (varused_test) return; const unsigned char *w = (const unsigned char *)s; const unsigned char *e = w+length; int linelength = 1; @@ -246,7 +238,6 @@ void write_cdata(const char *s, int length) { } void write_c(const char* format,...) { - if (varused_test) {varused = 1; return;} va_list args; va_start(args, format); vfprintf(code_file, format, args); @@ -254,7 +245,6 @@ void write_c(const char* format,...) { } void write_h(const char* format,...) { - if (varused_test) return; va_list args; va_start(args, format); vfprintf(header_file, format, args); |
