Fix compiler warnings
authorJ. Ali Harlow <ali@juiblex.co.uk>
Mon Jul 11 16:49:53 2016 +0100 (2016-07-11)
changeset 4899d0a04089d22
parent 488 7c6d932f291f
child 490 9e2943af74fe
Fix compiler warnings
librazor/uri-io.c
src/main.c
     1.1 --- a/librazor/uri-io.c	Mon Jul 11 13:54:54 2016 +0100
     1.2 +++ b/librazor/uri-io.c	Mon Jul 11 16:49:53 2016 +0100
     1.3 @@ -164,7 +164,6 @@
     1.4  	int is_dir;
     1.5  	char *path, *slash, *s;
     1.6  	void *addr;
     1.7 -	struct razor_error *tmp_error = NULL;
     1.8  
     1.9  	path = strdup(filename);
    1.10  	slash = strrchr(path, '/');
    1.11 @@ -226,7 +225,7 @@
    1.12  		addr = razor_file_get_contents_archive(filename, &size, error);
    1.13  		if (!addr) {
    1.14  			if (error && saved_errno != ENOTDIR &&
    1.15 -			    razor_error_matches(error, RAZOR_POSIX_ERROR,
    1.16 +			    razor_error_matches(*error, RAZOR_POSIX_ERROR,
    1.17  						ENOTDIR)) {
    1.18  				razor_error_free(*error);
    1.19  				*error = NULL;
     2.1 --- a/src/main.c	Mon Jul 11 13:54:54 2016 +0100
     2.2 +++ b/src/main.c	Mon Jul 11 16:49:53 2016 +0100
     2.3 @@ -682,7 +682,7 @@
     2.4  }
     2.5  #endif
     2.6  
     2.7 -void init_uri_handler(void)
     2.8 +static void init_uri_handler(void)
     2.9  {
    2.10  #ifdef HAVE_CURL
    2.11  	struct razor_uri_vtable uri_vtable={0,};
    2.12 @@ -741,7 +741,6 @@
    2.13  	int retval;
    2.14  	struct razor_set *set;
    2.15  	struct razor_atomic *atomic;
    2.16 -	char buffer[512];
    2.17  
    2.18  	switch (razor_getopt(argc, argv, 0, NULL, "", NULL)) {
    2.19  		case -2:
    2.20 @@ -1088,7 +1087,7 @@
    2.21  	const char *preunprog, *preun, *postunprog, *postun;
    2.22  	const char *install_prefix;
    2.23  	const char *const *prefixes;
    2.24 -	char *file, *s, *uri, *filename;
    2.25 +	char *s, *uri, *filename;
    2.26  	uint32_t flags;
    2.27  
    2.28  	importer = razor_importer_create();