diff options
author | Jonathan Beck | 2010-01-21 21:19:41 +0100 |
---|---|---|
committer | Jonathan Beck | 2010-01-21 21:19:41 +0100 |
commit | babec330acced3915332fa9a09b8252cfa99cf34 (patch) | |
tree | e5fdbcde4e3296b55f441012ec8f66b74ef286d1 /plutil/plutil.c | |
parent | 874942ec1600773622238ae28544908d292ef339 (diff) | |
download | libplist-babec330acced3915332fa9a09b8252cfa99cf34.tar.gz libplist-babec330acced3915332fa9a09b8252cfa99cf34.tar.bz2 |
Fix some warnings
Diffstat (limited to 'plutil/plutil.c')
-rw-r--r-- | plutil/plutil.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/plutil/plutil.c b/plutil/plutil.c index e9eaef1..88df080 100644 --- a/plutil/plutil.c +++ b/plutil/plutil.c @@ -38,7 +38,8 @@ int main(int argc, char *argv[]) FILE *iplist = NULL; plist_t root_node = NULL; char *plist_out = NULL; - int size = 0; + uint32_t size = 0; + int read_size = 0; char *plist_entire = NULL; struct stat *filestats = (struct stat *) malloc(sizeof(struct stat)); Options *options = parse_arguments(argc, argv); @@ -55,7 +56,7 @@ int main(int argc, char *argv[]) return 1; stat(options->in_file, filestats); plist_entire = (char *) malloc(sizeof(char) * (filestats->st_size + 1)); - fread(plist_entire, sizeof(char), filestats->st_size, iplist); + read_size = fread(plist_entire, sizeof(char), filestats->st_size, iplist); fclose(iplist); @@ -64,12 +65,12 @@ int main(int argc, char *argv[]) if (memcmp(plist_entire, "bplist00", 8) == 0) { - plist_from_bin(plist_entire, filestats->st_size, &root_node); + plist_from_bin(plist_entire, read_size, &root_node); plist_to_xml(root_node, &plist_out, &size); } else { - plist_from_xml(plist_entire, filestats->st_size, &root_node); + plist_from_xml(plist_entire, read_size, &root_node); plist_to_bin(root_node, &plist_out, &size); } plist_free(root_node); |