binutils-gdb/sim
Stafford Horne b6061d4d38 sim/common: Fix warnings: "warning: implicit declaration of function..."
During building of several cgen simulator's I notices the below
warnings.  Adding includes fixes these.

Including config.h allows stdio.h to properly configure itself to expose
asprintf().

The other warnings for abort, free, memset, strlen are trivial.

Warnings:

../../../binutils-gdb/sim/or1k/../common/sim-watch.c: In function ‘sim_watchpoint_install’:
../../../binutils-gdb/sim/or1k/../common/sim-watch.c:415:10: warning: implicit declaration of function ‘asprintf’; did you mean ‘vasprintf’? [-Wimplicit-function-declaration]
      if (asprintf (&name, "watch-%s-%s",
          ^~~~~~~~
          vasprintf

../../../binutils-gdb/sim/lm32/../common/hw-device.c: In function ‘hw_strdup’:
../../../binutils-gdb/sim/lm32/../common/hw-device.c:59:34: warning: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration]
       char *dup = hw_zalloc (me, strlen (str) + 1);
                                  ^~~~~~

../../../binutils-gdb/sim/lm32/../common/hw-events.c: In function ‘hw_event_queue_schedule’:
../../../binutils-gdb/sim/lm32/../common/hw-events.c:92:3: warning: implicit declaration of function ‘memset’ [-Wimplicit-function-declaration]
   memset (&dummy, 0, sizeof dummy);
   ^~~~~~

../../../binutils-gdb/sim/lm32/../common/hw-handles.c: In function ‘hw_handle_remove_ihandle’:
../../../binutils-gdb/sim/lm32/../common/hw-handles.c:211:4: warning: implicit declaration of function ‘free’ [-Wimplicit-function-declaration]
    free (delete);
    ^~~~

../../../binutils-gdb/sim/lm32/../common/sim-fpu.c: In function ‘pack_fpu’:
../../../binutils-gdb/sim/lm32/../common/sim-fpu.c:292:7: warning: implicit declaration of function ‘abort’ [-Wimplicit-function-declaration]
       abort ();
       ^~~~~

sim/common/ChangeLog:

	* sim-options.c: Include "config.h".
	Include <stdio.h>.
	* sim-watch.c: Include "config.h".
	Include <stdio.h>.
	* hw-device.c: Include <string.h>.
	* hw-events.c: Include <string.h>.
	* hw-handles.c: Include <stdlib.h>.
	* sim-fpu.c: Include <stdlib.h>.
2019-03-28 06:40:30 +09:00
..
aarch64 Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
arm Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
avr Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
bfin Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
common sim/common: Fix warnings: "warning: implicit declaration of function..." 2019-03-28 06:40:30 +09:00
cr16 Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
cris Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
d10v Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
erc32 Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
frv Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
ft32 Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
h8300 Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
igen Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
iq2000 Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
lm32 Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
m32c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
m32r Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
m68hc11 Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
mcore Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
microblaze Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
mips Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
mn10300 Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
moxie Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
msp430 Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
or1k Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
ppc Fix the sim build 2019-01-26 08:53:31 -07:00
rl78 Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
rx Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
sh Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
sh64 Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
testsuite Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
v850 Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
.gitignore
ChangeLog (gdb/sim) Move Mike Frysinger to past maintainers section 2019-02-28 11:20:29 +04:00
configure
configure.ac
configure.tgt
MAINTAINERS (gdb/sim) Move Mike Frysinger to past maintainers section 2019-02-28 11:20:29 +04:00
Makefile.in Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
README-HACKING