]> git.proxmox.com Git - qemu.git/commitdiff
Suppress gcc 4.x -Wpointer-sign (included in -Wall) warnings
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 20 Sep 2008 08:07:15 +0000 (08:07 +0000)
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 20 Sep 2008 08:07:15 +0000 (08:07 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5275 c046a42c-6fe2-441c-8c8c-71466251a162

25 files changed:
exec.c
fpu/softfloat.c
hw/mips_malta.c
hw/mips_mipssim.c
hw/mips_r4k.c
hw/nvram.h
hw/pl080.c
hw/ppc.c
hw/ppc4xx.h
hw/ppc4xx_devs.c
hw/pxa2xx_dma.c
hw/usb-net.c
linux-user/elfload.c
linux-user/syscall.c
linux-user/uaccess.c
slirp/bootp.c
slirp/tcp_subr.c
slirp/tftp.c
softmmu-semi.h
target-alpha/helper.c
target-ppc/cpu.h
target-ppc/op_helper.c
target-ppc/translate.c
target-ppc/translate_init.c
target-sh4/translate.c

diff --git a/exec.c b/exec.c
index c927fbc24da4ee758aba65bf5ce14e4732ae4d24..31374daa55dca04c9a6de1f2e8fcdeb230093313 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -1418,7 +1418,7 @@ void cpu_set_log(int log_flags)
 #if !defined(CONFIG_SOFTMMU)
         /* must avoid mmap() usage of glibc by setting a buffer "by hand" */
         {
-            static uint8_t logfile_buf[4096];
+            static char logfile_buf[4096];
             setvbuf(logfile, logfile_buf, _IOLBF, sizeof(logfile_buf));
         }
 #else
index 3ec1e0de1886257d3362ad118cbb2f78b9ca0150..3988bd10990df8fcd1af268c8555500f9d7e6718 100644 (file)
@@ -4987,7 +4987,7 @@ float128 float128_rem( float128 a, float128 b STATUS_PARAM )
         sub128( aSig0, aSig1, bSig0, bSig1, &aSig0, &aSig1 );
     } while ( 0 <= (sbits64) aSig0 );
     add128(
-        aSig0, aSig1, alternateASig0, alternateASig1, &sigMean0, &sigMean1 );
+        aSig0, aSig1, alternateASig0, alternateASig1, (bits64 *)&sigMean0, &sigMean1 );
     if (    ( sigMean0 < 0 )
          || ( ( ( sigMean0 | sigMean1 ) == 0 ) && ( q & 1 ) ) ) {
         aSig0 = alternateASig0;
index d94613c8e725d8986c9a243036c1e9117b322972..449b13bf30b30ae3a0469d36b1b1531ba15b4252 100644 (file)
@@ -701,7 +701,8 @@ static int64_t load_kernel (CPUState *env)
     ram_addr_t initrd_offset;
 
     if (load_elf(loaderparams.kernel_filename, VIRT_TO_PHYS_ADDEND,
-                 &kernel_entry, &kernel_low, &kernel_high) < 0) {
+                 (uint64_t *)&kernel_entry, (uint64_t *)&kernel_low,
+                 (uint64_t *)&kernel_high) < 0) {
         fprintf(stderr, "qemu: could not load kernel '%s'\n",
                 loaderparams.kernel_filename);
         exit(1);
index fb56dc5450563e7d6871dc8e343777a003e50a59..dc62f696a038fc4760ac4c8b1c3e553cd2c414f7 100644 (file)
@@ -61,7 +61,8 @@ static void load_kernel (CPUState *env)
     ram_addr_t initrd_offset;
 
     kernel_size = load_elf(loaderparams.kernel_filename, VIRT_TO_PHYS_ADDEND,
-                           &entry, &kernel_low, &kernel_high);
+                           (uint64_t *)&entry, (uint64_t *)&kernel_low,
+                           (uint64_t *)&kernel_high);
     if (kernel_size >= 0) {
         if ((entry & ~0x7fffffffULL) == 0x80000000)
             entry = (int32_t)entry;
index 8b3f4e93a3c4571ce0fc06a794bc8331f2133386..1499af78663bc218e5c36b0bea50e38b525ea8fe 100644 (file)
@@ -83,7 +83,8 @@ static void load_kernel (CPUState *env)
     ram_addr_t initrd_offset;
 
     kernel_size = load_elf(loaderparams.kernel_filename, VIRT_TO_PHYS_ADDEND,
-                           &entry, &kernel_low, &kernel_high);
+                           (uint64_t *)&entry, (uint64_t *)&kernel_low,
+                           (uint64_t *)&kernel_high);
     if (kernel_size >= 0) {
         if ((entry & ~0x7fffffffULL) == 0x80000000)
             entry = (int32_t)entry;
@@ -120,15 +121,15 @@ static void load_kernel (CPUState *env)
     /* Store command line.  */
     if (initrd_size > 0) {
         int ret;
-        ret = sprintf(phys_ram_base + (16 << 20) - 256,
+        ret = sprintf((char *)(phys_ram_base + (16 << 20) - 256),
                       "rd_start=0x" TARGET_FMT_lx " rd_size=%li ",
                       PHYS_TO_VIRT((uint32_t)initrd_offset),
                       initrd_size);
-        strcpy (phys_ram_base + (16 << 20) - 256 + ret,
+        strcpy ((char *)(phys_ram_base + (16 << 20) - 256 + ret),
                 loaderparams.kernel_cmdline);
     }
     else {
-        strcpy (phys_ram_base + (16 << 20) - 256,
+        strcpy ((char *)(phys_ram_base + (16 << 20) - 256),
                 loaderparams.kernel_cmdline);
     }
 
index 3ec5483021ebcd578575b94f2760f2001106cb3d..b346822c229e72d392f8c42cad6d9dc867969d55 100644 (file)
@@ -17,12 +17,12 @@ uint16_t NVRAM_get_word (nvram_t *nvram, uint32_t addr);
 void NVRAM_set_lword (nvram_t *nvram, uint32_t addr, uint32_t value);
 uint32_t NVRAM_get_lword (nvram_t *nvram, uint32_t addr);
 void NVRAM_set_string (nvram_t *nvram, uint32_t addr,
-                       const unsigned char *str, uint32_t max);
+                       const char *str, uint32_t max);
 int NVRAM_get_string (nvram_t *nvram, uint8_t *dst, uint16_t addr, int max);
 void NVRAM_set_crc (nvram_t *nvram, uint32_t addr,
                     uint32_t start, uint32_t count);
 int PPC_NVRAM_set_params (nvram_t *nvram, uint16_t NVRAM_size,
-                          const unsigned char *arch,
+                          const char *arch,
                           uint32_t RAM_size, int boot_device,
                           uint32_t kernel_image, uint32_t kernel_size,
                           const char *cmdline,
index 059e667028ff65da99048237d9f563ab8d173734..66d0398fda6ac672a3d861a7439e6558d4402754 100644 (file)
@@ -80,7 +80,7 @@ static void pl080_run(pl080_state *s)
     int src_id;
     int dest_id;
     int size;
-    char buff[4];
+    uint8_t buff[4];
     uint32_t req;
 
     s->tc_mask = 0;
index fc92ab2673a24fbafb3eed18fee492b5f1546e62..fd247aa87d7c733d33bc659d73ee59cad35291ea 100644 (file)
--- a/hw/ppc.c
+++ b/hw/ppc.c
@@ -1305,7 +1305,7 @@ uint32_t NVRAM_get_lword (nvram_t *nvram, uint32_t addr)
 }
 
 void NVRAM_set_string (nvram_t *nvram, uint32_t addr,
-                       const unsigned char *str, uint32_t max)
+                       const char *str, uint32_t max)
 {
     int i;
 
@@ -1366,7 +1366,7 @@ uint16_t NVRAM_compute_crc (nvram_t *nvram, uint32_t start, uint32_t count)
 #define CMDLINE_ADDR 0x017ff000
 
 int PPC_NVRAM_set_params (nvram_t *nvram, uint16_t NVRAM_size,
-                          const unsigned char *arch,
+                          const char *arch,
                           uint32_t RAM_size, int boot_device,
                           uint32_t kernel_image, uint32_t kernel_size,
                           const char *cmdline,
@@ -1387,7 +1387,7 @@ int PPC_NVRAM_set_params (nvram_t *nvram, uint16_t NVRAM_size,
     NVRAM_set_lword(nvram,  0x3C, kernel_size);
     if (cmdline) {
         /* XXX: put the cmdline in NVRAM too ? */
-        strcpy(phys_ram_base + CMDLINE_ADDR, cmdline);
+        strcpy((char *)(phys_ram_base + CMDLINE_ADDR), cmdline);
         NVRAM_set_lword(nvram,  0x40, CMDLINE_ADDR);
         NVRAM_set_lword(nvram,  0x44, strlen(cmdline));
     } else {
index 8d7863c1491ff71c7bae99fb8562a5c9c37f2790..538e4468047d1c2bee62d5edc2b2956366bf9399 100644 (file)
@@ -26,7 +26,7 @@
 #define PPC_4XX_H
 
 /* PowerPC 4xx core initialization */
-CPUState *ppc4xx_init (const unsigned char *cpu_model,
+CPUState *ppc4xx_init (const char *cpu_model,
                        clk_setup_t *cpu_clk, clk_setup_t *tb_clk,
                        uint32_t sysclk);
 
index f9143dd4fdd3b96d952c994a9bad86ee4697d078..ee821f5b5b1a35782239a12f884ba90f572f8c2b 100644 (file)
@@ -35,7 +35,7 @@ extern FILE *logfile;
 
 /*****************************************************************************/
 /* Generic PowerPC 4xx processor instanciation */
-CPUState *ppc4xx_init (const unsigned char *cpu_model,
+CPUState *ppc4xx_init (const char *cpu_model,
                        clk_setup_t *cpu_clk, clk_setup_t *tb_clk,
                        uint32_t sysclk)
 {
index 4e33c53173e3a28830f4960a409e32d5e9202cfa..8219392bbd921c9c6f34241928bb15cbf1fb817b 100644 (file)
@@ -177,7 +177,7 @@ static void pxa2xx_dma_run(struct pxa2xx_dma_state_s *s)
     uint32_t n, size;
     uint32_t width;
     uint32_t length;
-    char buffer[32];
+    uint8_t buffer[32];
     struct pxa2xx_dma_channel_s *ch;
 
     if (s->running ++)
index a4714c5bc350d6055d315a2c458d101b621e0249..82005af5688376c5c1700f157ac26e2eb342bf4f 100644 (file)
@@ -681,8 +681,8 @@ static int ndis_query(USBNetState *s, uint32_t oid,
 
     /* mandatory */
     case OID_GEN_VENDOR_DESCRIPTION:
-        pstrcpy(outbuf, outlen, "QEMU USB RNDIS Net");
-        return strlen(outbuf) + 1;
+        pstrcpy((char *)outbuf, outlen, "QEMU USB RNDIS Net");
+        return strlen((char *)outbuf) + 1;
 
     case OID_GEN_VENDOR_DRIVER_VERSION:
         *((le32 *) outbuf) = cpu_to_le32(1);
index 32767c09cbe2f4797d28f2e2cc78a909861c54f9..fcae78f7f6c694d8a92d0c603db2b22b74f5565c 100644 (file)
@@ -1240,7 +1240,7 @@ int load_elf_binary(struct linux_binprm * bprm, struct target_pt_regs * regs,
        }
 
        if (interp_elf_ex.e_ident[0] != 0x7f ||
-               strncmp(&interp_elf_ex.e_ident[1], "ELF",3) != 0) {
+            strncmp((char *)&interp_elf_ex.e_ident[1], "ELF",3) != 0) {
            interpreter_type &= ~INTERPRETER_ELF;
        }
 
index a3b975d8bceb0303faa84ea1a38ba4606594dc0c..0260756c23723a532ef94da5a2751dee888e0544 100644 (file)
@@ -947,7 +947,8 @@ static abi_long do_getsockopt(int sockfd, int level, int optname,
                               abi_ulong optval_addr, abi_ulong optlen)
 {
     abi_long ret;
-    int len, lv, val;
+    int len, val;
+    socklen_t lv;
 
     switch(level) {
     case TARGET_SOL_SOCKET:
index ed50437566f9d0bd47b039cc384ca247926c355e..4d506935f8cad50c48c6c3ee85fee40d556ba47a 100644 (file)
@@ -62,7 +62,7 @@ abi_long target_strlen(abi_ulong guest_addr1)
         ptr = lock_user(VERIFY_READ, guest_addr, max_len, 1);
         if (!ptr)
             return -TARGET_EFAULT;
-        len = qemu_strnlen(ptr, max_len);
+        len = qemu_strnlen((const char *)ptr, max_len);
         unlock_user(ptr, guest_addr, 0);
         guest_addr += len;
         /* we don't allow wrapping or integer overflow */
index 3ae3db209eb1d673572413d05f50d6bf830035c2..27220ee2053ad911da96de1fa292d6db3bb9648b 100644 (file)
@@ -172,7 +172,8 @@ static void bootp_reply(struct bootp_t *bp)
     }
 
     if (bootp_filename)
-        snprintf(rbp->bp_file, sizeof(rbp->bp_file), "%s", bootp_filename);
+        snprintf((char *)rbp->bp_file, sizeof(rbp->bp_file), "%s",
+                 bootp_filename);
 
     dprintf("offered addr=%08x\n", ntohl(daddr.sin_addr.s_addr));
 
index ec423b763a1c7b50027cfacd6e4e9a2738e60ef5..bce07a6cbd52bb583faa22059e7691ab23d4f5ad 100644 (file)
@@ -447,7 +447,7 @@ tcp_connect(inso)
 {
        struct socket *so;
        struct sockaddr_in addr;
-       int addrlen = sizeof(struct sockaddr_in);
+       socklen_t addrlen = sizeof(struct sockaddr_in);
        struct tcpcb *tp;
        int s, opt;
 
@@ -649,7 +649,7 @@ tcp_emu(so, m)
                {
                        struct socket *tmpso;
                        struct sockaddr_in addr;
-                       int addrlen = sizeof(struct sockaddr_in);
+                       socklen_t addrlen = sizeof(struct sockaddr_in);
                        struct sbuf *so_rcv = &so->so_rcv;
 
                        memcpy(so_rcv->sb_wptr, m->m_data, m->m_len);
index 8c0126866af408eafe7fdb8be76645fce38beee7..4ad55048b2c28145e625058c4428cc71c68beb36 100644 (file)
@@ -149,8 +149,10 @@ static int tftp_send_oack(struct tftp_session *spt,
     m->m_data += sizeof(struct udpiphdr);
 
     tp->tp_op = htons(TFTP_OACK);
-    n += snprintf(tp->x.tp_buf + n, sizeof(tp->x.tp_buf) - n, "%s", key) + 1;
-    n += snprintf(tp->x.tp_buf + n, sizeof(tp->x.tp_buf) - n, "%u", value) + 1;
+    n += snprintf((char *)tp->x.tp_buf + n, sizeof(tp->x.tp_buf) - n, "%s",
+                  key) + 1;
+    n += snprintf((char *)tp->x.tp_buf + n, sizeof(tp->x.tp_buf) - n, "%u",
+                  value) + 1;
 
     saddr.sin_addr = recv_tp->ip.ip_dst;
     saddr.sin_port = recv_tp->udp.uh_dport;
@@ -190,7 +192,7 @@ static int tftp_send_error(struct tftp_session *spt,
 
   tp->tp_op = htons(TFTP_ERROR);
   tp->x.tp_error.tp_error_code = htons(errorcode);
-  pstrcpy(tp->x.tp_error.tp_msg, sizeof(tp->x.tp_error.tp_msg), msg);
+  pstrcpy((char *)tp->x.tp_error.tp_msg, sizeof(tp->x.tp_error.tp_msg), msg);
 
   saddr.sin_addr = recv_tp->ip.ip_dst;
   saddr.sin_port = recv_tp->udp.uh_dport;
@@ -325,8 +327,8 @@ static void tftp_handle_rrq(struct tftp_t *tp, int pktlen)
   /* do sanity checks on the filename */
 
   if ((spt->filename[0] != '/')
-      || (spt->filename[strlen(spt->filename) - 1] == '/')
-      ||  strstr(spt->filename, "/../")) {
+      || (spt->filename[strlen((char *)spt->filename) - 1] == '/')
+      ||  strstr((char *)spt->filename, "/../")) {
       tftp_send_error(spt, 2, "Access violation", tp);
       return;
   }
@@ -353,7 +355,7 @@ static void tftp_handle_rrq(struct tftp_t *tp, int pktlen)
   while (k < n) {
       const char *key, *value;
 
-      key = src + k;
+      key = (char *)src + k;
       k += strlen(key) + 1;
 
       if (k >= n) {
@@ -361,7 +363,7 @@ static void tftp_handle_rrq(struct tftp_t *tp, int pktlen)
          return;
       }
 
-      value = src + k;
+      value = (char *)src + k;
       k += strlen(value) + 1;
 
       if (strcmp(key, "tsize") == 0) {
index 8bf96f4976c25065ef47f555aa3be5106edc485d..79278cc763a0e2e2c4dae3e5ea43da6628a5edcf 100644 (file)
@@ -37,7 +37,7 @@ static inline void softmmu_tput32(CPUState *env, uint32_t addr, uint32_t val)
 static void *softmmu_lock_user(CPUState *env, uint32_t addr, uint32_t len,
                                int copy)
 {
-    char *p;
+    uint8_t *p;
     /* TODO: Make this something that isn't fixed size.  */
     p = malloc(len);
     if (copy)
index 7384ba266b880436957716a1fb975c0a2149da65..e0d06b452a22c1f57ac5eaa23b059cabbdf70d2a 100644 (file)
@@ -411,7 +411,7 @@ void cpu_dump_state (CPUState *env, FILE *f,
                      int (*cpu_fprintf)(FILE *f, const char *fmt, ...),
                      int flags)
 {
-    static const unsigned char *linux_reg_names[] = {
+    static const char *linux_reg_names[] = {
         "v0 ", "t0 ", "t1 ", "t2 ", "t3 ", "t4 ", "t5 ", "t6 ",
         "t7 ", "s0 ", "s1 ", "s2 ", "s3 ", "s4 ", "s5 ", "fp ",
         "a0 ", "a1 ", "a2 ", "a3 ", "a4 ", "a5 ", "t8 ", "t9 ",
index 1edf44931df909c00cff6eaa35baa987756a100c..b50a593ed172467ec1628ea971d79db5065943f2 100644 (file)
@@ -303,7 +303,7 @@ struct ppc_spr_t {
     void (*hea_read)(void *opaque, int spr_num);
     void (*hea_write)(void *opaque, int spr_num);
 #endif
-    const unsigned char *name;
+    const char *name;
 };
 
 /* Altivec registers (128 bits) */
@@ -733,7 +733,7 @@ void cpu_ppc_reset (void *opaque);
 
 void ppc_cpu_list (FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...));
 
-const ppc_def_t *cpu_ppc_find_by_name (const unsigned char *name);
+const ppc_def_t *cpu_ppc_find_by_name (const char *name);
 int cpu_ppc_register_internal (CPUPPCState *env, const ppc_def_t *def);
 
 /* Time-base and decrementer management */
index 1c081728076986a09237a8b54152090f4d8948f0..46e9b7ab6c06db9b95fd586905c83ec886eb616e 100644 (file)
@@ -244,7 +244,7 @@ void do_mulldo (void)
     int64_t th;
     uint64_t tl;
 
-    muls64(&tl, &th, T0, T1);
+    muls64(&tl, (uint64_t *)&th, T0, T1);
     T0 = (int64_t)tl;
     /* If th != 0 && th != -1, then we had an overflow */
     if (likely((uint64_t)(th + 1) <= 1)) {
index 56bdef2b69f799e6cd923b4b835fcac011827e6a..2d646b9afc0271ee685643f3108ef54571765c02 100644 (file)
@@ -220,7 +220,7 @@ struct opc_handler_t {
     /* handler */
     void (*handler)(DisasContext *ctx);
 #if defined(DO_PPC_STATISTICS) || defined(PPC_DUMP_CPU)
-    const unsigned char *oname;
+    const char *oname;
 #endif
 #if defined(DO_PPC_STATISTICS)
     uint64_t count;
@@ -347,7 +347,7 @@ typedef struct opcode_t {
     unsigned char pad[1];
 #endif
     opc_handler_t handler;
-    const unsigned char *oname;
+    const char *oname;
 } opcode_t;
 
 /*****************************************************************************/
index 3e103dd3a2b4fb21b11712188a8740e8e70f3bf7..67951bf200cf18c36c26da0cb1e85701e4c8cf24 100644 (file)
@@ -34,7 +34,7 @@
 #endif
 
 struct ppc_def_t {
-    const unsigned char *name;
+    const char *name;
     uint32_t pvr;
     uint32_t svr;
     uint64_t insns_flags;
@@ -433,13 +433,13 @@ do {                                                                          \
      _spr_register(env, num, name, uea_read, uea_write, initial_value);       \
 } while (0)
 static inline void _spr_register (CPUPPCState *env, int num,
-                                  const unsigned char *name,
+                                  const char *name,
                                   void (*uea_read)(void *opaque, int sprn),
                                   void (*uea_write)(void *opaque, int sprn),
                                   target_ulong initial_value)
 #else
 static inline void spr_register (CPUPPCState *env, int num,
-                                 const unsigned char *name,
+                                 const char *name,
                                  void (*uea_read)(void *opaque, int sprn),
                                  void (*uea_write)(void *opaque, int sprn),
                                  void (*oea_read)(void *opaque, int sprn),
@@ -1245,7 +1245,7 @@ static void gen_spr_usprgh (CPUPPCState *env)
 /* PowerPC BookE SPR */
 static void gen_spr_BookE (CPUPPCState *env, uint64_t ivor_mask)
 {
-    const unsigned char *ivor_names[64] = {
+    const char *ivor_names[64] = {
         "IVOR0",  "IVOR1",  "IVOR2",  "IVOR3",
         "IVOR4",  "IVOR5",  "IVOR6",  "IVOR7",
         "IVOR8",  "IVOR9",  "IVOR10", "IVOR11",
@@ -1407,7 +1407,7 @@ static void gen_spr_BookE (CPUPPCState *env, uint64_t ivor_mask)
 static void gen_spr_BookE_FSL (CPUPPCState *env, uint32_t mas_mask)
 {
 #if !defined(CONFIG_USER_ONLY)
-    const unsigned char *mas_names[8] = {
+    const char *mas_names[8] = {
         "MAS0", "MAS1", "MAS2", "MAS3", "MAS4", "MAS5", "MAS6", "MAS7",
     };
     int mas_sprn[8] = {
@@ -9157,7 +9157,7 @@ static int create_ppc_opcodes (CPUPPCState *env, const ppc_def_t *def)
 static void dump_ppc_insns (CPUPPCState *env)
 {
     opc_handler_t **table, *handler;
-    const unsigned char *p, *q;
+    const char *p, *q;
     uint8_t opc1, opc2, opc3;
 
     printf("Instructions set:\n");
@@ -9240,7 +9240,7 @@ int cpu_ppc_register_internal (CPUPPCState *env, const ppc_def_t *def)
     init_ppc_proc(env, def);
 #if defined(PPC_DUMP_CPU)
     {
-        const unsigned char *mmu_model, *excp_model, *bus_model;
+        const char *mmu_model, *excp_model, *bus_model;
         switch (env->mmu_model) {
         case POWERPC_MMU_32B:
             mmu_model = "PowerPC 32";
@@ -9443,10 +9443,10 @@ static const ppc_def_t *ppc_find_by_pvr (uint32_t pvr)
 
 #include <ctype.h>
 
-const ppc_def_t *cpu_ppc_find_by_name (const unsigned char *name)
+const ppc_def_t *cpu_ppc_find_by_name (const char *name)
 {
     const ppc_def_t *ret;
-    const unsigned char *p;
+    const char *p;
     int i, max, len;
 
     /* Check if the given name is a PVR */
index 82f4168f41d66117f065c0fb315ea10054e4f71a..b9dcbc2f038dee740fcde96c467b98619b63e09b 100644 (file)
@@ -183,7 +183,7 @@ void cpu_sh4_reset(CPUSH4State * env)
 }
 
 typedef struct {
-    const unsigned char *name;
+    const char *name;
     int id;
     uint32_t pvr;
     uint32_t prr;
@@ -206,7 +206,7 @@ static sh4_def_t sh4_defs[] = {
     },
 };
 
-static const sh4_def_t *cpu_sh4_find_by_name(const unsigned char *name)
+static const sh4_def_t *cpu_sh4_find_by_name(const char *name)
 {
     int i;