From 404ebb8b0b133711d0e8ec7ab057f71f14dd9590 Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Sun, 4 Jan 2015 13:49:22 +0100 Subject: hosted target: Fix uninitialized variable in dirinfo.attribute cppcheck reported: [rockbox/firmware/target/hosted/filesystem-app.c:509]: (error) Uninitialized struct member: ret.attribute [rockbox/firmware/target/hosted/filesystem-app.c:517]: (error) Uninitialized struct member: ret.attribute Change-Id: Ie8cab727faa8110a6fe3926dbcf852e8b9e96ca7 --- firmware/target/hosted/filesystem-app.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/firmware/target/hosted/filesystem-app.c b/firmware/target/hosted/filesystem-app.c index d73704737a..bcc880eab0 100644 --- a/firmware/target/hosted/filesystem-app.c +++ b/firmware/target/hosted/filesystem-app.c @@ -474,7 +474,8 @@ bool app_dir_exists(const char *dirname) struct dirinfo dir_get_info(DIR *dirp, struct dirent *entry) { struct __dir *this = (struct __dir *)dirp; - struct dirinfo ret = { .mtime = 0 }; + struct dirinfo ret = { .attribute = 0, + .mtime = 0 }; if (!this) FILE_ERROR_RETURN(EBADF, ret); -- cgit