Fix warnings int the lttv/sync directory
[lttv.git] / lttv / lttv / sync / event_matching_broadcast.c
index 968856979b157496dcd6c00ac5c2d64e7740c758..4c66d18157d1ffa28c7c4afa7ce8d877c9b1d606 100644 (file)
@@ -1,19 +1,18 @@
 /* This file is part of the Linux Trace Toolkit viewer
- * Copyright (C) 2009 Benjamin Poirier <benjamin.poirier@polymtl.ca>
+ * Copyright (C) 2009, 2010 Benjamin Poirier <benjamin.poirier@polymtl.ca>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License Version 2 as
- * published by the Free Software Foundation;
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 2.1 of the License, or (at
+ * your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+ * License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- * MA 02111-1307, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -37,14 +36,12 @@ static void initMatchingBroadcast(SyncState* const syncState);
 static void destroyMatchingBroadcast(SyncState* const syncState);
 
 static void matchEventBroadcast(SyncState* const syncState, Event* const event);
-static GArray* finalizeMatchingBroadcast(SyncState* const syncState);
+static AllFactors* finalizeMatchingBroadcast(SyncState* const syncState);
 static void printMatchingStatsBroadcast(SyncState* const syncState);
 static void writeMatchingGraphsPlotsBroadcast(SyncState* const syncState, const
        unsigned int i, const unsigned int j);
 
 // Functions specific to this module
-static void registerMatchingBroadcast() __attribute__((constructor (101)));
-
 static void partialDestroyMatchingBroadcast(SyncState* const syncState);
 
 static void openGraphDataFiles(SyncState* const syncState);
@@ -71,7 +68,7 @@ static MatchingModule matchingModuleBroadcast = {
 /*
  * Matching module registering function
  */
-static void registerMatchingBroadcast()
+void registerMatchingBroadcast()
 {
        g_queue_push_tail(&matchingModules, &matchingModuleBroadcast);
 }
@@ -298,9 +295,9 @@ static void matchEventBroadcast(SyncState* const syncState, Event* const event)
  *   syncState     container for synchronization data.
  *
  * Returns:
- *   Factors[traceNb] synchronization factors for each trace
+ *   AllFactors*   synchronization factors for each trace pair
  */
-static GArray* finalizeMatchingBroadcast(SyncState* const syncState)
+static AllFactors* finalizeMatchingBroadcast(SyncState* const syncState)
 {
        MatchingDataBroadcast* matchingData;
 
@@ -385,7 +382,7 @@ static void openGraphDataFiles(SyncState* const syncState)
                        g_assert_cmpint(retval, <=, sizeof(name) - 1);
                        if ((graphs->accuracyPoints[i][j]= fopen(name, "w")) == NULL)
                        {
-                               g_error(strerror(errno));
+                               g_error("%s", strerror(errno));
                        }
                }
        }
@@ -393,7 +390,7 @@ static void openGraphDataFiles(SyncState* const syncState)
        retval= chdir(cwd);
        if (retval == -1)
        {
-               g_error(strerror(errno));
+               g_error("%s", strerror(errno));
        }
        free(cwd);
 }
@@ -463,7 +460,7 @@ static void closeGraphDataFiles(SyncState* const syncState)
                        retval= fclose(graphs->accuracyPoints[i][j]);
                        if (retval != 0)
                        {
-                               g_error(strerror(errno));
+                               g_error("%s", strerror(errno));
                        }
                }
                free(graphs->accuracyPoints[i]);
This page took 0.025764 seconds and 4 git commands to generate.