summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/CursesDialog/form/fty_ipv4.c2
-rw-r--r--Source/cmake.cxx8
-rw-r--r--Utilities/cmcurl/Testing/sepheaders.c2
-rw-r--r--Utilities/cmcurl/Testing/simplessl.c2
-rw-r--r--Utilities/cmcurl/cookie.c2
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_string.c2
6 files changed, 12 insertions, 6 deletions
diff --git a/Source/CursesDialog/form/fty_ipv4.c b/Source/CursesDialog/form/fty_ipv4.c
index 4ac8a50..c855af6 100644
--- a/Source/CursesDialog/form/fty_ipv4.c
+++ b/Source/CursesDialog/form/fty_ipv4.c
@@ -30,7 +30,7 @@ static bool Check_IPV4_Field(FIELD * field, const void * argp)
{
char *bp = field_buffer(field,0);
int num = 0, len;
- unsigned int d1, d2, d3, d4;
+ unsigned int d1=256, d2=256, d3=256, d4=256;
argp=0; /* Silence unused parameter warning. */
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 592b5ec..290aff0 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -3667,11 +3667,11 @@ void cmake::RecordPropertyAccess(const char *name,
void cmake::ReportUndefinedPropertyAccesses(const char *filename)
{
+ if(!this->GlobalGenerator)
+ { return; }
FILE *progFile = fopen(filename,"w");
- if (!progFile || !this->GlobalGenerator)
- {
- return;
- }
+ if(!progFile)
+ { return; }
// what are the enabled languages?
std::vector<std::string> enLangs;
diff --git a/Utilities/cmcurl/Testing/sepheaders.c b/Utilities/cmcurl/Testing/sepheaders.c
index 8185787..fc5b783 100644
--- a/Utilities/cmcurl/Testing/sepheaders.c
+++ b/Utilities/cmcurl/Testing/sepheaders.c
@@ -56,6 +56,7 @@ int main(int argc, char **argv)
bodyfile = fopen(bodyfilename,"w");
if (bodyfile == NULL) {
curl_easy_cleanup(curl_handle);
+ fclose(headerfile);
return -1;
}
@@ -70,6 +71,7 @@ int main(int argc, char **argv)
/* close the header file */
fclose(headerfile);
+ fclose(bodyfile);
/* cleanup curl stuff */
curl_easy_cleanup(curl_handle);
diff --git a/Utilities/cmcurl/Testing/simplessl.c b/Utilities/cmcurl/Testing/simplessl.c
index 9a53603..e307eaa 100644
--- a/Utilities/cmcurl/Testing/simplessl.c
+++ b/Utilities/cmcurl/Testing/simplessl.c
@@ -114,5 +114,7 @@ int main(int argc, char **argv)
curl_global_cleanup();
+ if (headerfile)
+ fclose(headerfile);
return 0;
}
diff --git a/Utilities/cmcurl/cookie.c b/Utilities/cmcurl/cookie.c
index 2856ad8..d8ea241 100644
--- a/Utilities/cmcurl/cookie.c
+++ b/Utilities/cmcurl/cookie.c
@@ -969,6 +969,8 @@ int Curl_cookie_output(struct CookieInfo *c, char *dumphere)
format_ptr = get_netscape_format(co);
if (format_ptr == NULL) {
fprintf(out, "#\n# Fatal libcurl error\n");
+ if(!use_stdout)
+ fclose(out);
return 1;
}
fprintf(out, "%s\n", format_ptr);
diff --git a/Utilities/cmlibarchive/libarchive/archive_string.c b/Utilities/cmlibarchive/libarchive/archive_string.c
index cbfad2c..370a5fc 100644
--- a/Utilities/cmlibarchive/libarchive/archive_string.c
+++ b/Utilities/cmlibarchive/libarchive/archive_string.c
@@ -1248,8 +1248,8 @@ create_sconv_object(const char *fc, const char *tc,
}
sc->to_charset = strdup(tc);
if (sc->to_charset == NULL) {
- free(sc);
free(sc->from_charset);
+ free(sc);
return (NULL);
}
archive_string_init(&sc->utftmp);