ia64/xen-unstable

changeset 15897:c7140b8f56ac

[IA64] clean up xenitp build warnings

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author Alex Williamson <alex.williamson@hp.com>
date Wed Sep 26 12:43:41 2007 -0600 (2007-09-26)
parents 42d4313b5fdd
children 788c39a0b905
files tools/debugger/xenitp/xenitp.c
line diff
     1.1 --- a/tools/debugger/xenitp/xenitp.c	Mon Sep 24 14:21:02 2007 -0600
     1.2 +++ b/tools/debugger/xenitp/xenitp.c	Wed Sep 26 12:43:41 2007 -0600
     1.3 @@ -790,12 +790,12 @@ int parse_unary (unsigned char **buf, un
     1.4      case '0' ... '9':
     1.5          {
     1.6              char *e;
     1.7 -            *res = strtoul (*buf, &e, 0);
     1.8 +            *res = strtoul ((char *)*buf, &e, 0);
     1.9              if (e == (char *)*buf) {
    1.10                  printf ("bad literal\n");
    1.11                  return -1;
    1.12              }
    1.13 -            *buf = e;
    1.14 +            *buf = (unsigned char *)e;
    1.15          }
    1.16          break;
    1.17      case '+':
    1.18 @@ -828,13 +828,13 @@ int parse_unary (unsigned char **buf, un
    1.19  
    1.20              c = b[len];
    1.21              b[len] = 0;
    1.22 -            reg = get_reg_addr (b);
    1.23 +            reg = get_reg_addr ((char *)b);
    1.24              b[len] = c;
    1.25  
    1.26              if (reg != NULL)
    1.27                  *res = *reg;
    1.28 -            else if (strncmp (b, "d2p", len) == 0 ||
    1.29 -                     strncmp (b, "i2p", len) == 0) {
    1.30 +            else if (strncmp ((char *)b, "d2p", len) == 0 ||
    1.31 +                     strncmp ((char *)b, "i2p", len) == 0) {
    1.32                  unsigned long vaddr;
    1.33  
    1.34                  *buf = e;
    1.35 @@ -1205,31 +1205,31 @@ static const struct bit_xlat debug_flags
    1.36  static int
    1.37  cmd_disp (unsigned char *arg)
    1.38  {
    1.39 -    if (strcmp (arg, "br") == 0)
    1.40 +    if (strcmp ((char *)arg, "br") == 0)
    1.41          print_br (cur_ctx);
    1.42 -    else if (strcmp (arg, "regs") == 0)
    1.43 +    else if (strcmp ((char *)arg, "regs") == 0)
    1.44          print_regs (cur_ctx);
    1.45 -    else if (strcmp (arg, "cr") == 0)
    1.46 +    else if (strcmp ((char *)arg, "cr") == 0)
    1.47          print_cr (cur_ctx);
    1.48 -    else if (strcmp (arg, "ar") == 0)
    1.49 +    else if (strcmp ((char *)arg, "ar") == 0)
    1.50          print_ar (cur_ctx);
    1.51 -    else if (strcmp (arg, "tr") == 0)
    1.52 +    else if (strcmp ((char *)arg, "tr") == 0)
    1.53          print_tr (cur_ctx);
    1.54 -    else if (strcmp (arg, "rr") == 0)
    1.55 +    else if (strcmp ((char *)arg, "rr") == 0)
    1.56          print_rr (cur_ctx);
    1.57 -    else if (strcmp (arg, "db") == 0)
    1.58 +    else if (strcmp ((char *)arg, "db") == 0)
    1.59          print_db (cur_ctx);
    1.60 -    else if (strcmp (arg, "psr") == 0) {
    1.61 +    else if (strcmp ((char *)arg, "psr") == 0) {
    1.62          printf ("psr:");
    1.63          print_bits (psr_bits, cur_ctx->regs.psr);
    1.64          printf ("\n");
    1.65      }
    1.66 -    else if (strcmp (arg, "ipsr") == 0) {
    1.67 +    else if (strcmp ((char *)arg, "ipsr") == 0) {
    1.68          printf ("ipsr:");
    1.69          print_bits (psr_bits, cur_ctx->regs.cr.ipsr);
    1.70          printf ("\n");
    1.71      }
    1.72 -    else if (strcmp (arg, "break") == 0) {
    1.73 +    else if (strcmp ((char *)arg, "break") == 0) {
    1.74          int i;
    1.75  
    1.76          for (i = 0; i < 4; i++)
    1.77 @@ -1238,7 +1238,7 @@ cmd_disp (unsigned char *arg)
    1.78                          (cur_ctx->regs.ibr[2 * i + 1] & (1UL << 63)) ?
    1.79                          "enabled" : "disabled");
    1.80      }
    1.81 -    else if (strcmp (arg, "domain") == 0) {
    1.82 +    else if (strcmp ((char *)arg, "domain") == 0) {
    1.83          xc_dominfo_t dominfo;
    1.84  #ifdef HAVE_DEBUG_OP
    1.85          xen_ia64_debug_op_t debug_op;
    1.86 @@ -1311,7 +1311,7 @@ cmd_bev (unsigned char *arg)
    1.87          return 0;
    1.88      }
    1.89      else {
    1.90 -        char *p = strtok (arg, " ");
    1.91 +        char *p = strtok ((char *)arg, " ");
    1.92  
    1.93          while (p != NULL) {
    1.94              unsigned int flag = 0;
    1.95 @@ -1353,7 +1353,7 @@ cmd_set (unsigned char *line)
    1.96  
    1.97      reg = parse_arg (&line);
    1.98  
    1.99 -    addr = get_reg_addr (reg);
   1.100 +    addr = get_reg_addr ((char *)reg);
   1.101      if (addr == NULL) {
   1.102          printf ("unknown register %s\n", reg);
   1.103          return -1;
   1.104 @@ -1499,10 +1499,10 @@ void xenitp (int vcpu)
   1.105  
   1.106          printf ("XenITP> ");
   1.107  
   1.108 -        if (fgets (buf, sizeof (buf), stdin) == NULL)
   1.109 +        if (fgets ((char *)buf, sizeof (buf), stdin) == NULL)
   1.110              break;
   1.111  
   1.112 -        len = strlen (buf);
   1.113 +        len = strlen ((char *)buf);
   1.114          if (len > 1 && buf[len - 1] == '\n')
   1.115              buf[len - 1] = 0;
   1.116