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.c

    r474 r521  
    282282
    283283///////////////////////////////////////
    284 void boot_strcpy(char* dest, char* src)
     284void boot_strcpy( char * dest, const char * src)
    285285{
    286286    /* Checking if the arguments are correct. */
     
    294294
    295295/////////////////////////////
    296 uint32_t boot_strlen(char* s)
     296uint32_t boot_strlen( const char * s )
    297297{
    298298    uint32_t res = 0;   /* Length of the string (in bytes).             */
     
    309309
    310310///////////////////////////////////
    311 int boot_strcmp(char* s1, char* s2)
     311int boot_strcmp( const char * s1, const char * s2 )
    312312{
    313313    if ((s1 == NULL) || (s2 == NULL))
     
    333333
    334334/////////////////////////
    335 void boot_puts(char* str)
     335void boot_puts( const char * str )
    336336{
    337337    boot_tty_write(str, boot_strlen(str));
     
    340340   
    341341///////////////////////////////////////
    342 void boot_printf( char * format , ... )
     342void boot_printf( const char * format , ... )
    343343{
    344344    va_list args;
Note: See TracChangeset for help on using the changeset viewer.