Ignore:
Timestamp:
Aug 30, 2018, 6:39:41 PM (6 years ago)
Author:
viala@…
Message:

[boot] Add const qualifier where it's possible.

Fix some gcc warning of "const qualifier discarded" warning.
Because litterals string are of type 'const char *'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/boot/tsar_mips32/boot_utils.h

    r474 r521  
    150150 * @ dest   : pointer to the destination string.
    151151 ****************************************************************************/
    152 void boot_strcpy(char* dest, char* src);
     152void boot_strcpy( char* dest, const char * src );
    153153
    154154/****************************************************************************
     
    158158 * @ returns the number of bytes in the string.
    159159 ****************************************************************************/
    160 uint32_t boot_strlen(char* s);
     160uint32_t boot_strlen( const char * s );
    161161
    162162/****************************************************************************
     
    166166 * @ returns 0 if these 2 strings match, 1 otherwise.
    167167 ****************************************************************************/
    168 int boot_strcmp(char* s1, char* s2);
     168int boot_strcmp( const char * s1, const char * s2 );
    169169
    170170/****************************************************************************
     
    177177 * @ str    : pointer to the string to be printed on the boot TTY terminal.
    178178 ****************************************************************************/
    179 void boot_puts(char* str);
     179void boot_puts( const char* str );
    180180
    181181/****************************************************************************
     
    200200 *  - %s : NUL terminated string. 
    201201 ****************************************************************************/
    202 void boot_printf(char* format, ...);
     202void boot_printf( const char* format, ... );
    203203
    204204/****************************************************************************
Note: See TracChangeset for help on using the changeset viewer.