Changeset b07eae90 in rtems


Ignore:
Timestamp:
03/09/17 20:55:59 (7 years ago)
Author:
Joel Sherrill <joel@…>
Branches:
5, master
Children:
e026dbc5
Parents:
b437a360
git-author:
Joel Sherrill <joel@…> (03/09/17 20:55:59)
git-committer:
Joel Sherrill <joel@…> (03/09/17 22:59:12)
Message:

libbsp/mips/shared/irq.c: Fix warnings

Location:
c/src/lib/libbsp/mips/shared/irq
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/mips/shared/irq/irq.c

    rb437a360 rb07eae90  
    2020
    2121
     22#include <inttypes.h>
     23
    2224#include <bsp.h>
    2325#include <bsp/irq.h>
    2426#include <bsp/irq-generic.h>
    2527#include <libcpu/isr_entries.h>
     28#include <rtems/bspIo.h>
    2629
    2730static const char *const cause_strings[32] = {
     
    8992  mips_get_cause( cause );
    9093
    91   printk( "Unhandled exception %d\n", vector );
    92   printk( "sr: 0x%08x  cause: 0x%08x --> %s\n", sr, cause,
     94  printk( "Unhandled exception %" PRId32 "\n", vector );
     95  printk( "sr: 0x%08" PRIu32 "  cause: 0x%08" PRIu32 " --> %s\n", sr, cause,
    9396     cause_strings[(cause >> 2) &0x1f] );
    9497  #if 0
  • c/src/lib/libbsp/mips/shared/irq/vectorexceptions.c

    rb437a360 rb07eae90  
    1818
    1919#include <rtems.h>
     20#include <inttypes.h>
    2021#include <stdlib.h>
    2122#include <string.h>
     
    2425#include <rtems/bspIo.h>
    2526#include <bsp/irq-generic.h>
    26 
    27 static const char *const cause_strings[32] =
    28 {
    29   /*  0 */ "Int",
    30   /*  1 */ "TLB Mods",
    31   /*  2 */ "TLB Load",
    32   /*  3 */ "TLB Store",
    33   /*  4 */ "Address Load",
    34   /*  5 */ "Address Store",
    35   /*  6 */ "Instruction Bus Error",
    36   /*  7 */ "Data Bus Error",
    37   /*  8 */ "Syscall",
    38   /*  9 */ "Breakpoint",
    39   /* 10 */ "Reserved Instruction",
    40   /* 11 */ "Coprocessor Unuseable",
    41   /* 12 */ "Overflow",
    42   /* 13 */ "Trap",
    43   /* 14 */ "Instruction Virtual Coherency Error",
    44   /* 15 */ "FP Exception",
    45   /* 16 */ "Reserved 16",
    46   /* 17 */ "Reserved 17",
    47   /* 18 */ "Reserved 18",
    48   /* 19 */ "Reserved 19",
    49   /* 20 */ "Reserved 20",
    50   /* 21 */ "Reserved 21",
    51   /* 22 */ "Reserved 22",
    52   /* 23 */ "Watch",
    53   /* 24 */ "Reserved 24",
    54   /* 25 */ "Reserved 25",
    55   /* 26 */ "Reserved 26",
    56   /* 27 */ "Reserved 27",
    57   /* 28 */ "Reserved 28",
    58   /* 29 */ "Reserved 29",
    59   /* 30 */ "Reserved 30",
    60   /* 31 */ "Data Virtual Coherency Error"
    61 };
    6227
    6328struct regdef
     
    8954     for(j=0; j< 7-strlen(dumpregs[i].name); j++) printk(" ");
    9055#if (__mips == 1 ) || (__mips == 32)
    91      printk("  %08X%c", frame_u32[dumpregs[i].offset], (i%3) ? '\t' : '\n' );
     56     printk("  %08" PRIu32 "%c",
     57            frame_u32[dumpregs[i].offset], (i%3) ? '\t' : '\n' );
    9258#elif __mips == 3
    93      printk("  %08X", frame_u32[2 * dumpregs[i].offset + 1] );
    94      printk("%08X%c", frame_u32[2 * dumpregs[i].offset], (i%2) ? '\t' : '\n' );
     59     printk("  %08" PRIu32 "", frame_u32[2 * dumpregs[i].offset + 1] );
     60     printk("%08" PRIu32 "%c",
     61            frame_u32[2 * dumpregs[i].offset], (i%2) ? '\t' : '\n' );
    9562#endif
    9663  }
Note: See TracChangeset for help on using the changeset viewer.