Conditionally define xmltarget_${name} variable in regdat.sh
authorTom Tromey <tom@tromey.com>
Mon, 9 Jul 2018 02:31:58 +0000 (20:31 -0600)
committerTom Tromey <tom@tromey.com>
Sun, 22 Jul 2018 19:20:07 +0000 (13:20 -0600)
This changes regdat.sh to emit the xmltarget_${name} variable inside
the #ifndef IN_PROCESS_AGENT block.  This avoids a -Wunused-variable
warning for some builds.  Thanks to Pedro for investigating this one.

gdb/ChangeLog
2018-07-22  Tom Tromey  <tom@tromey.com>

* regformats/regdat.sh: Define xmltarget_${name} inside
#ifndef IN_PROCESS_AGENT.

gdb/ChangeLog
gdb/regformats/regdat.sh

index 511ac9fabdd082a15d8b898839b126da19d43b67..972184dc997ba7eda7594a1c3365786ac54ce1fa 100644 (file)
@@ -1,3 +1,8 @@
+2018-07-22  Tom Tromey  <tom@tromey.com>
+
+       * regformats/regdat.sh: Define xmltarget_${name} inside
+       #ifndef IN_PROCESS_AGENT.
+
 2018-07-22  Tom Tromey  <tom@tromey.com>
 
        * value.c (value_fetch_lazy_bitfield): Remove unused variable.
index 5a8564ac50c0ae69787437d61c740cde2772f996..06f1ffc4305b8975f5ed3030308134516bf62985 100755 (executable)
@@ -163,6 +163,8 @@ done
 
 echo
 echo "static const char *expedite_regs_${name}[] = { \"`echo ${expedite} | sed 's/,/", "/g'`\", 0 };"
+
+echo "#ifndef IN_PROCESS_AGENT"
 if test "${feature}" != x; then
   echo "static const char *xmltarget_${name} = 0;"
 elif test "${xmltarget}" = x; then
@@ -184,7 +186,6 @@ fi
 echo
 
 cat <<EOF
-#ifndef IN_PROCESS_AGENT
   result->xmltarget = xmltarget_${name};
 #endif
 
This page took 0.031574 seconds and 4 git commands to generate.