Conditionally define xmltarget_${name} variable in regdat.sh

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.
This commit is contained in:
Tom Tromey
2018-07-08 20:31:58 -06:00
parent b0a7723d29
commit 3b20124b3d
2 changed files with 7 additions and 1 deletions

View 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> 2018-07-22 Tom Tromey <tom@tromey.com>
* value.c (value_fetch_lazy_bitfield): Remove unused variable. * value.c (value_fetch_lazy_bitfield): Remove unused variable.

View File

@@ -163,6 +163,8 @@ done
echo echo
echo "static const char *expedite_regs_${name}[] = { \"`echo ${expedite} | sed 's/,/", "/g'`\", 0 };" echo "static const char *expedite_regs_${name}[] = { \"`echo ${expedite} | sed 's/,/", "/g'`\", 0 };"
echo "#ifndef IN_PROCESS_AGENT"
if test "${feature}" != x; then if test "${feature}" != x; then
echo "static const char *xmltarget_${name} = 0;" echo "static const char *xmltarget_${name} = 0;"
elif test "${xmltarget}" = x; then elif test "${xmltarget}" = x; then
@@ -184,7 +186,6 @@ fi
echo echo
cat <<EOF cat <<EOF
#ifndef IN_PROCESS_AGENT
result->xmltarget = xmltarget_${name}; result->xmltarget = xmltarget_${name};
#endif #endif