Changeset 488 for trunk


Ignore:
Timestamp:
Aug 22, 2018, 9:17:05 PM (3 years ago)
Author:
viala@…
Message:

[kernel] Add const to syscall_str return type.

`
kern/do_syscall.c:108:8: warning: no previous declaration for 'syscall_str' [-Wmissing-declarations]

char * syscall_str( uint32_t index )


kern/do_syscall.c: In function 'syscall_str':
kern/do_syscall.c:110:48: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]

if ( index == SYS_THREAD_EXIT ) return "THREAD_EXIT"; 0


kern/do_syscall.c:111:48: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]

else if( index == SYS_THREAD_YIELD ) return "THREAD_YIELD"; 1

~

kern/do_syscall.c:112:48: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]

else if( index == SYS_THREAD_CREATE ) return "THREAD_CREATE"; 2


`

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/do_syscall.c

    r473 r488  
    106106
    107107////////////////////////////////////
    108 char * syscall_str( uint32_t index )
     108const char * syscall_str( uint32_t index )
    109109{
    110110        if     ( index == SYS_THREAD_EXIT    ) return "THREAD_EXIT";      // 0
Note: See TracChangeset for help on using the changeset viewer.