diff options
author | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-01-11 09:37:41 +0000 |
---|---|---|
committer | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-01-11 09:37:41 +0000 |
commit | 12c93bdc9307eabbbed4b44655392a6ddef5945b (patch) | |
tree | c5e05a87edd7d6a573b0a05b0fcea5b4eb4c682c /lib/sbin/create_c_stuff.pl | |
parent | 4468abd1912519aba94602e0de5a6d60f33bc425 (diff) |
Adding macros for using parameters and arguments to remove compiler warnings
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1225 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/create_c_stuff.pl')
-rw-r--r-- | lib/sbin/create_c_stuff.pl | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/sbin/create_c_stuff.pl b/lib/sbin/create_c_stuff.pl index d5b4442a..7cde48d0 100644 --- a/lib/sbin/create_c_stuff.pl +++ b/lib/sbin/create_c_stuff.pl @@ -192,6 +192,7 @@ sub CreateCStructureParameterHeader my(%parameters); my($type, $type_string); my(@definition); + my(@use); # Create the structure @@ -210,9 +211,15 @@ sub CreateCStructureParameterHeader $line = $type_string ." " .$parameter . " = $structure.$parameter;"; - push(@definition, $line) + push(@definition, $line); + + $line = "(void *) $parameter;"; + + push(@use, $line); + } + # Some compilers don't like an empty structure. if((keys %$rhparameters) == 0) { @@ -234,6 +241,13 @@ sub CreateCStructureParameterHeader push(@data, ""); + push(@data, "#define USE_$structure"."_PARAMS \\"); + + foreach $line (@use) + { + push(@data, " $line \\"); + } + return @data; } |