X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fwgtpkg-files.c;h=503a84bdd73940a31c9c37870aecf3d6d94c65b0;hb=3a6e947bef1b2942e24d2fdee1a76dbf3305b508;hp=a89c52bed1e21225555d142138d68268a9309263;hpb=c0fc18e47e49dd4e3cc2f09452a19297dad63f9c;p=src%2Fapp-framework-main.git diff --git a/src/wgtpkg-files.c b/src/wgtpkg-files.c index a89c52b..503a84b 100644 --- a/src/wgtpkg-files.c +++ b/src/wgtpkg-files.c @@ -1,5 +1,5 @@ /* - Copyright 2015 IoT.bzh + Copyright 2015, 2016, 2017 IoT.bzh author: José Bollo @@ -27,7 +27,8 @@ #include #include "verbose.h" -#include "wgtpkg.h" +#include "wgtpkg-workdir.h" +#include "wgtpkg-files.h" struct fdb { unsigned int count; @@ -251,9 +252,10 @@ void file_clear_flags() allfiles.files[i]->flags &= flag_signature; } -static int fill_files_rec(char name[PATH_MAX], int offset) +static int fill_files_rec(char name[PATH_MAX], unsigned offset) { - int len, err, fd; + int err, fd; + unsigned len; DIR *dir; struct dirent *ent; @@ -273,7 +275,7 @@ static int fill_files_rec(char name[PATH_MAX], int offset) ent = readdir(dir); while (ent != NULL) { - len = strlen(ent->d_name); + len = (unsigned)strlen(ent->d_name); if (ent->d_name[0] == '.' && (len == 1 || (ent->d_name[1] == '.' && len == 2))) ;