aboutsummaryrefslogtreecommitdiffstats
path: root/src/wgtpkg-xmlsec.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-03-16 16:05:28 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2016-03-16 17:31:58 +0100
commit2c6fcae14552ab6e7addc82516617a135f86b5ca (patch)
treee6c8aff7b0fca5ef81c02bfb7c2d71ec6fc97046 /src/wgtpkg-xmlsec.c
parentabfae2b6d73d7be40ffbff8e8429f71d82df90b5 (diff)
cmake: improves error detection
Add detection of problem of cast. The problems are corrected in the patch. Change-Id: I8dc1e987531790860e390dea53ddf49d52339cb2 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/wgtpkg-xmlsec.c')
-rw-r--r--src/wgtpkg-xmlsec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wgtpkg-xmlsec.c b/src/wgtpkg-xmlsec.c
index 2d52cc6..f2863db 100644
--- a/src/wgtpkg-xmlsec.c
+++ b/src/wgtpkg-xmlsec.c
@@ -80,7 +80,7 @@ static void *file_open_cb(const char *file)
/* read the opened file */
static int file_read_cb(void *context, char *buffer, int len)
{
- size_t r = fread(buffer, 1, len, (FILE*)context);
+ size_t r = fread(buffer, 1, (unsigned)len, (FILE*)context);
return r ? (int)r : feof((FILE*)context) ? 0 : - 1;
}
@@ -274,7 +274,7 @@ static const struct { const char *id; const char *xml; } properties[2] = {
/* create a signature of 'index' (0 for author, other values for distributors)
using the private 'key' (filename) and the certificates 'certs' (filenames)
as trusted chain */
-xmlDocPtr xmlsec_create(int index, const char *key, const char **certs)
+xmlDocPtr xmlsec_create(unsigned int index, const char *key, const char **certs)
{
unsigned int i, fc, mask;
struct filedesc *fdesc;