From: batt Date: Tue, 11 Nov 2008 15:51:16 +0000 (+0000) Subject: Silence uninitialized value warning. X-Git-Tag: 2.0.0~12 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=d65fe01c6af406827602c9e762b0eb99eca0fc71;p=bertos.git Silence uninitialized value warning. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1922 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/fs/battfs.c b/bertos/fs/battfs.c index 1ea39c50..6fd6ec82 100644 --- a/bertos/fs/battfs.c +++ b/bertos/fs/battfs.c @@ -522,6 +522,9 @@ bool battfs_fsck(struct BattFsSuper *disk) bool start = true; + /* Uneeded, the first time will be overwritten but useful to silence + * the warning for uninitialized value */ + FSCHECK(readHdr(disk, 0, &prev_hdr)); for (pgcnt_t page = 0; page < disk->page_count; page++) { FSCHECK(readHdr(disk, disk->page_array[page], &hdr));