aboutsummaryrefslogtreecommitdiff
path: root/sim/m68hc11/gencode.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-08-13 01:41:57 -0700
committerMike Frysinger <vapier@gentoo.org>2016-08-13 22:46:27 -0700
commit527aaa4a3143afedd8dd85aa70862328a9dbe627 (patch)
tree5110c46b53b2d0cfb648a3fab594c5b89aa5b2df /sim/m68hc11/gencode.c
parent4c171e25a8c83fc26b78430fa632fa9e64f61050 (diff)
downloadfsf-binutils-gdb-527aaa4a3143afedd8dd85aa70862328a9dbe627.zip
fsf-binutils-gdb-527aaa4a3143afedd8dd85aa70862328a9dbe627.tar.gz
fsf-binutils-gdb-527aaa4a3143afedd8dd85aa70862328a9dbe627.tar.bz2
sim: m68hc11: fix up various prototype related warnings
A few funcs are only used locally, so mark them static to avoid warnings due to -Wmissing-prototypes. Some funcs cast the return value wrong, so drop them (and let void * just work by default). Update some prototypes to be new style.
Diffstat (limited to 'sim/m68hc11/gencode.c')
-rw-r--r--sim/m68hc11/gencode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sim/m68hc11/gencode.c b/sim/m68hc11/gencode.c
index 1b1844d..a3032f8 100644
--- a/sim/m68hc11/gencode.c
+++ b/sim/m68hc11/gencode.c
@@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <errno.h>
@@ -1987,8 +1988,7 @@ void
gen_function_entry (FILE *fp, const char *name, int locals)
{
/* Generate interpretor entry point. */
- print (fp, 0, "%s (proc)\n", name);
- print (fp, indent_level, "struct _sim_cpu* proc;");
+ print (fp, 0, "%s (sim_cpu *proc)\n", name);
print (fp, indent_level, "{\n");
/* Interpretor local variables. */
@@ -2007,7 +2007,7 @@ gen_function_close (FILE *fp)
}
int
-cmp_opcode (void* e1, void* e2)
+cmp_opcode (const void *e1, const void *e2)
{
struct m6811_opcode_def* op1 = (struct m6811_opcode_def*) e1;
struct m6811_opcode_def* op2 = (struct m6811_opcode_def*) e2;