Changeset 597 for soft


Ignore:
Timestamp:
Jul 9, 2015, 2:11:17 PM (9 years ago)
Author:
guerin
Message:

fat32: fix warnings

This also fixes a bug where the first directory entry was skipped
because lfn wasn't initialized.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_fat32/fat32.c

    r596 r597  
    20762076    unsigned int      attr;             // directory entry ATTR field
    20772077    unsigned int      ord;              // directory entry ORD field
    2078     unsigned int      lfn;              // LFN entries number             
     2078    unsigned int      lfn = 0;          // LFN entries number
    20792079    unsigned int      dentry;           // directory entry index
    20802080    unsigned int      offset     = 0;   // byte offset in buffer
     
    23942394    unsigned int    length;               // searched name length
    23952395    unsigned int    parent_cluster;       // cluster index for the parent directory
    2396     unsigned int    child_cluster;        // cluster index for the searched file/dir
    2397     unsigned int    child_size;           // size of the searched file/dir
     2396    unsigned int    child_cluster = 0;    // cluster index for the searched file/dir
     2397    unsigned int    child_size = 0;       // size of the searched file/dir
    23982398    unsigned int    child_is_dir;         // type of the searched file/dir
    23992399    unsigned int    offset;               // offset in a 4 Kbytes buffer
    24002400    unsigned int    ord;                  // ORD field in a directory entry
    24012401    unsigned int    attr;                 // ATTR field in a directory entry
    2402     unsigned int    lfn;                  // number of lfn entries
     2402    unsigned int    lfn = 0;              // number of lfn entries
    24032403    unsigned char*  buf;                  // pointer on a 4 Kbytes buffer
    24042404    unsigned int    found;                // name found in current directory entry
Note: See TracChangeset for help on using the changeset viewer.