Fix warnings int the lttv/sync directory
[lttv.git] / lttv / lttv / sync / event_analysis_chull.c
index 154258e00effc5af9369dc13c1c036e2d999125a..d36022c94ec9e29484ff4c0a9b4b7ce27f1b96f7 100644 (file)
@@ -240,7 +240,7 @@ static void openGraphFiles(SyncState* const syncState)
                                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)
        {
-               g_error(strerror(errno));
+               g_error("%s", strerror(errno));
        }
        free(cwd);
 }
@@ -329,7 +329,7 @@ static void closeGraphFiles(SyncState* const syncState)
                                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++)
                        {
-                               // 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);
+
+               /* Be careful, this invalidates all problem objects which still exist.
+                * Don't keep copies of lps past this point. */
+               glp_free_env();
        }
 #endif
 
This page took 0.023297 seconds and 4 git commands to generate.