Commit da823c35 authored by Ziirish's avatar Ziirish

fixing segfault in debian >6

parent 396cc003
......@@ -38,7 +38,7 @@ get_amarock_musicData (CidMainContainer **pCid)
if (error)
{
cid_warning (error->message);
cid_warning ("%s",error->message);
musicData.opening = FALSE;
musicData.playing = FALSE;
......
......@@ -77,7 +77,7 @@ cid_launch_measure (CidMeasure *pMeasureTimer)
GThread* pThread = g_thread_create ((GThreadFunc) _cid_threaded_calculation, pMeasureTimer, FALSE, &erreur);
if (erreur != NULL)
{ // on n'a pas pu lancer le thread.
cid_warning (erreur->message);
cid_warning ("%s",erreur->message);
g_error_free (erreur);
g_atomic_int_set (&pMeasureTimer->iThreadIsRunning, 0);
}
......
......@@ -99,7 +99,7 @@ cid_focus (GtkWidget *pWidget, GdkEventExpose *event, gpointer *userdata)
gboolean bFocusIn = GPOINTER_TO_INT (&userdata[0]);
cid_info ("CID is currently focused %s.", bFocusIn ? "in" : "out");
//cid_info ("CID is currently focused %s.", bFocusIn ? "in" : "out");
if (cid->config->bShowAbove)
gtk_window_set_keep_below (GTK_WINDOW (cid->pWindow), !bFocusIn);
......
......@@ -102,7 +102,7 @@ cid_launch_task (CidTask *pTask)
GThread* pThread = g_thread_create ((GThreadFunc) _cid_threaded_calculation, pTask, FALSE, &erreur);
if (erreur != NULL) // on n'a pas pu lancer le thread.
{
cid_warning (erreur->message);
cid_warning ("%s",erreur->message);
g_error_free (erreur);
g_atomic_int_set (&pTask->iThreadIsRunning, 0);
}
......
......@@ -219,7 +219,7 @@ cid_load_key_file(CidMainContainer **pCid, GKeyFile **pKeyFile, const gchar *cFi
/* Load the GKeyFile or return. */
if (!g_key_file_load_from_file (*pKeyFile, cFile, flags, &error))
{
cid_warning (error->message);
cid_warning ("%s",error->message);
g_error_free (error);
return FALSE;
}
......
......@@ -133,7 +133,7 @@ cid_search_xml_xpath (const char *filename, gchar **cValue, const gchar*xpath, .
xmlXPathContextPtr ctxt = xmlXPathNewContext(doc);
if (ctxt == NULL)
{
cid_warning ( "Erreur lors de la création du contexte XPath");
cid_warning ("Erreur lors de la création du contexte XPath");
return;
}
......@@ -221,7 +221,7 @@ cid_store_cover (CidMainContainer **pCid,const gchar *cCoverPath,
/* Load the GKeyFile or return. */
if (!g_key_file_load_from_file (pKeyFile, cDBFile, flags, &error))
{
cid_warning (error->message);
cid_warning ("%s",error->message);
g_error_free (error);
}
gchar *cDestFile = g_strdup_printf ("%s/%s", cid->config->cDLPath, md5);
......@@ -245,10 +245,13 @@ cid_search_cover (CidMainContainer **pCid, const gchar *cArtist, const gchar *cA
GKeyFile *pKeyFile;
CURL *handle = curl_easy_init();
gchar *cCoverPath = NULL;
gchar *cKey = g_strdup_printf ("%s_%s", curl_easy_escape (handle, cArtist, 0),
curl_easy_escape (handle, cAlbum, 0));
gchar *cKey = g_strdup_printf ("%s_%s",
curl_easy_escape (handle, cArtist, 0),
curl_easy_escape (handle, cAlbum, 0));
curl_easy_cleanup (handle);
gchar *cDBFile = g_strdup_printf ("%s/%s", cid->config->cDLPath, CID_COVER_DB);
gchar *cDBFile = g_strdup_printf ("%s/%s",
cid->config->cDLPath,
CID_COVER_DB);
GKeyFileFlags flags;
GError *error = NULL;
......@@ -258,7 +261,7 @@ cid_search_cover (CidMainContainer **pCid, const gchar *cArtist, const gchar *cA
if (!g_key_file_load_from_file (pKeyFile, cDBFile, flags, &error))
{
cid_warning (error->message);
cid_warning ("%s",error->message);
g_error_free (error);
g_free (cKey);
g_free (cDBFile);
......@@ -268,7 +271,7 @@ cid_search_cover (CidMainContainer **pCid, const gchar *cArtist, const gchar *cA
gchar *cVal = g_key_file_get_value (pKeyFile, "DB", cKey, &error);
if (error != NULL)
{
cid_warning (error->message);
cid_warning ("%s",error->message);
g_error_free (error);
}
if (cVal != NULL)
......
......@@ -112,7 +112,7 @@ cid_edit_conf_file_core (GtkWindow *pWindow, gchar *cConfFilePath, const gchar *
g_key_file_load_from_file (pKeyFile, cConfFilePath, G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS, &erreur);
if (erreur != NULL)
{
cid_warning (erreur->message);
cid_warning ("%s",erreur->message);
g_error_free (erreur);
return FALSE;
}
......@@ -1580,7 +1580,7 @@ _cid_set_original_value (GtkButton *button, gpointer *data)
g_key_file_load_from_file (pKeyFile, cOriginalConfFilePath, G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS, &erreur);
if (erreur != NULL)
{
cid_warning (erreur->message);
cid_warning ("%s",erreur->message);
g_error_free (erreur);
erreur = NULL;
return ;
......
......@@ -96,7 +96,7 @@ cid_exit (CidMainContainer **pCid, int code, const gchar *mess, ...)
va_list args;
va_start (args, mess);
gchar *cFullText = g_strdup_vprintf (mess, args);
cid_error (cFullText);
cid_error ("%s",cFullText);
g_free (cFullText);
va_end (args);
cid_sortie (pCid, code);
......
......@@ -285,7 +285,7 @@ cid_preload_module_from_directory (const gchar *cModuleDirPath, GError **erreur)
pModule = cid_load_module (sFilePath->str, &tmp_erreur);
if (tmp_erreur != NULL)
{
cid_warning (tmp_erreur->message);
cid_warning ("%s",tmp_erreur->message);
g_error_free (tmp_erreur);
tmp_erreur = NULL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment