Changeset a000878c in mainline for kernel/arch/ia32/src


Ignore:
Timestamp:
2010-02-25T19:11:25Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
958de16
Parents:
a634485
Message:

make sure that all statically allocated strings are declared as "const char *"
and are treated as read-only

Location:
kernel/arch/ia32/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/cpu/cpu.c

    ra634485 ra000878c  
    6464};
    6565
    66 static char *vendor_str[] = {
     66static const char *vendor_str[] = {
    6767        "Unknown Vendor",
    6868        "AMD",
  • kernel/arch/ia32/src/interrupt.c

    ra634485 ra000878c  
    6565void decode_istate(istate_t *istate)
    6666{
    67         char *symbol;
    68 
    69         symbol = symtab_fmt_name_lookup(istate->eip);
    70 
     67        const char *symbol = symtab_fmt_name_lookup(istate->eip);
     68       
    7169        if (CPU)
    7270                printf("----------------EXCEPTION OCCURED (cpu%u)----------------\n", CPU->id);
    7371        else
    7472                printf("----------------EXCEPTION OCCURED----------------\n");
    75                
     73       
    7674        printf("%%eip: %#lx (%s)\n", istate->eip, symbol);
    7775        printf("ERROR_WORD=%#lx\n", istate->error_word);
     
    8078        printf("stack: %#lx, %#lx, %#lx, %#lx\n", istate->stack[0], istate->stack[1], istate->stack[2], istate->stack[3]);
    8179        printf("       %#lx, %#lx, %#lx, %#lx\n", istate->stack[4], istate->stack[5], istate->stack[6], istate->stack[7]);
    82 
     80       
    8381        stack_trace_istate(istate);
    8482}
  • kernel/arch/ia32/src/mm/frame.c

    ra634485 ra000878c  
    2727 */
    2828
    29 /** @addtogroup ia32mm 
     29/** @addtogroup ia32mm
    3030 * @{
    3131 */
     
    109109}
    110110
    111 static char *e820names[] = {
     111static const char *e820names[] = {
    112112        "invalid",
    113113        "available",
     
    122122{
    123123        unsigned int i;
    124         char *name;
     124        const char *name;
    125125       
    126126        printf("Base               Size               Name\n");
Note: See TracChangeset for help on using the changeset viewer.