summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Jarosch <tomj@simonv.com>2015-01-04 13:49:22 +0100
committerThomas Jarosch <tomj@simonv.com>2015-01-04 13:52:29 +0100
commit404ebb8b0b133711d0e8ec7ab057f71f14dd9590 (patch)
treedb48465cd6f7572e66829fa582968b0a01a02aa0
parent89ab3c27610d441479c6e4133c73043762191b5a (diff)
downloadrockbox-404ebb8.tar.gz
rockbox-404ebb8.tar.bz2
rockbox-404ebb8.zip
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
-rw-r--r--firmware/target/hosted/filesystem-app.c3
1 files changed, 2 insertions, 1 deletions
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);