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

    r519 r521  
    401401 * @ returns 0 on success, -1 on error.                                     *
    402402 ****************************************************************************/
    403 static int get_path_component(char*      pathname,
    404                               char*      path_component,
    405                               uint32_t * nb_read)
     403static int get_path_component( const char * pathname,
     404                               char       * path_component,
     405                               uint32_t  * nb_read)
    406406{
    407407    uint32_t pathname_offset;   // index used to scan the LFN entry
     
    585585 * @ returns 0 on success, -1 on error.                                     *
    586586 ****************************************************************************/
    587 static int fat_file_search(char*    pathname,
    588                            uint32_t* first_cluster,
    589                            uint32_t* file_size)
     587static int fat_file_search( const char * pathname,
     588                            uint32_t   * first_cluster,
     589                            uint32_t   * file_size)
    590590{
    591591    char       path_comp[PATH_MAX_SIZE];    // Buffer for a path component
     
    886886
    887887///////////////////////////////////////
    888 int boot_fat32_load( char*    pathname,
    889                      uint32_t buff_addr,
    890                      uint32_t buff_size )
     888int boot_fat32_load( const char * pathname,
     889                     uint32_t     buff_addr,
     890                     uint32_t     buff_size )
    891891{
    892892    uint32_t cur_cluster;
Note: See TracChangeset for help on using the changeset viewer.