projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix format-security warnings when building with trace-sync
[lttv.git]
/
lttv
/
lttv
/
sync
/
event_analysis_chull.c
diff --git
a/lttv/lttv/sync/event_analysis_chull.c
b/lttv/lttv/sync/event_analysis_chull.c
index 154258e00effc5af9369dc13c1c036e2d999125a..cc3aad52b4a3e8b2eabb98569f7e582154dd4270 100644
(file)
--- a/
lttv/lttv/sync/event_analysis_chull.c
+++ b/
lttv/lttv/sync/event_analysis_chull.c
@@
-240,7
+240,7
@@
static void openGraphFiles(SyncState* const syncState)
if ((analysisData->graphsData->hullPoints[i][j]= fopen(name, "w")) ==
NULL)
{
if ((analysisData->graphsData->hullPoints[i][j]= fopen(name, "w")) ==
NULL)
{
- g_error(strerror(errno));
+ g_error(
"%s",
strerror(errno));
}
}
}
}
}
}
@@
-249,7
+249,7
@@
static void openGraphFiles(SyncState* const syncState)
retval= chdir(cwd);
if (retval == -1)
{
retval= chdir(cwd);
if (retval == -1)
{
- g_error(strerror(errno));
+ g_error(
"%s",
strerror(errno));
}
free(cwd);
}
}
free(cwd);
}
@@
-329,7
+329,7
@@
static void closeGraphFiles(SyncState* const syncState)
retval= fclose(analysisData->graphsData->hullPoints[i][j]);
if (retval != 0)
{
retval= fclose(analysisData->graphsData->hullPoints[i][j]);
if (retval != 0)
{
- g_error(strerror(errno));
+ g_error(
"%s",
strerror(errno));
}
}
}
}
}
}
@@
-384,13
+384,15
@@
static void destroyAnalysisCHull(SyncState* const syncState)
for (j= 0; j < i; j++)
{
for (j= 0; j < i; j++)
{
- // There seems to be a memory leak in glpk, valgrind reports a
- // loss (reachable) even if the problem is deleted
glp_delete_prob(analysisData->lps[i][j]);
}
free(analysisData->lps[i]);
}
free(analysisData->lps);
glp_delete_prob(analysisData->lps[i][j]);
}
free(analysisData->lps[i]);
}
free(analysisData->lps);
+
+ /* Be careful, this invalidates all problem objects which still exist.
+ * Don't keep copies of lps past this point. */
+ glp_free_env();
}
#endif
}
#endif
@@
-1675,14
+1677,14
@@
static AllFactors* finalizeAnalysisCHullLP(SyncState* const syncState)
if ((fp= fopen(fileName, "w")) == NULL)
{
if ((fp= fopen(fileName, "w")) == NULL)
{
- g_error(strerror(errno));
+ g_error(
"%s",
strerror(errno));
}
fprintf(fp, "#%-24s %-25s %-25s %-25s\n", "x", "middle", "min", "max");
retval= chdir(cwd);
if (retval == -1)
{
}
fprintf(fp, "#%-24s %-25s %-25s %-25s\n", "x", "middle", "min", "max");
retval= chdir(cwd);
if (retval == -1)
{
- g_error(strerror(errno));
+ g_error(
"%s",
strerror(errno));
}
free(cwd);
}
free(cwd);
This page took
0.031929 seconds
and
4
git commands to generate.