[libegg] Fix some compiler warnings
- From: Christian Persch <chpe src gnome org>
- To: svn-commits-list gnome org
- Subject: [libegg] Fix some compiler warnings
- Date: Thu, 25 Jun 2009 17:25:41 +0000 (UTC)
commit 521e43de0d889cb5ca931ede40d4767f2111ff32
Author: Christian Persch <chpe gnome org>
Date: Thu Jun 25 17:34:46 2009 +0200
Fix some compiler warnings
libegg/smclient/egg-launch.c | 4 +++-
libegg/smclient/eggdesktopfile.c | 2 ++
libegg/smclient/eggsmclient-xsmp.c | 12 ++++++------
3 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/libegg/smclient/egg-launch.c b/libegg/smclient/egg-launch.c
index 3ff43d9..ab50f18 100644
--- a/libegg/smclient/egg-launch.c
+++ b/libegg/smclient/egg-launch.c
@@ -48,7 +48,8 @@ main (int argc, char **argv)
{
GOptionContext *ctx;
EggDesktopFile *desktop_file;
- char *desktop_file_path, *type, *command;
+ char *desktop_file_path, *command;
+ const char *type;
GError *error = NULL;
GdkDisplay *gdk_display;
GdkScreen *screen;
@@ -136,6 +137,7 @@ main (int argc, char **argv)
case EGG_DESKTOP_FILE_TYPE_LINK:
type = "Link";
break;
+ case EGG_DESKTOP_FILE_TYPE_UNRECOGNIZED:
default:
type = "Unrecognized";
break;
diff --git a/libegg/smclient/eggdesktopfile.c b/libegg/smclient/eggdesktopfile.c
index 357e548..b99f35e 100644
--- a/libegg/smclient/eggdesktopfile.c
+++ b/libegg/smclient/eggdesktopfile.c
@@ -1386,6 +1386,8 @@ egg_desktop_file_launch (EggDesktopFile *desktop_file,
free_document_list (documents);
break;
+ case EGG_DESKTOP_FILE_TYPE_UNRECOGNIZED:
+ case EGG_DESKTOP_FILE_TYPE_DIRECTORY:
default:
g_set_error (error, EGG_DESKTOP_FILE_ERROR,
EGG_DESKTOP_FILE_ERROR_NOT_LAUNCHABLE,
diff --git a/libegg/smclient/eggsmclient-xsmp.c b/libegg/smclient/eggsmclient-xsmp.c
index 1a56156..8bebfba 100644
--- a/libegg/smclient/eggsmclient-xsmp.c
+++ b/libegg/smclient/eggsmclient-xsmp.c
@@ -1052,13 +1052,13 @@ generate_command (char **restart_command, const char *client_id,
if (client_id)
{
- g_ptr_array_add (cmd, "--sm-client-id");
+ g_ptr_array_add (cmd, (char *)"--sm-client-id");
g_ptr_array_add (cmd, (char *)client_id);
}
if (state_file)
{
- g_ptr_array_add (cmd, "--sm-client-state-file");
+ g_ptr_array_add (cmd, (char *)"--sm-client-state-file");
g_ptr_array_add (cmd, (char *)state_file);
}
@@ -1141,7 +1141,7 @@ array_prop (const char *name, ...)
prop = g_new (SmProp, 1);
prop->name = (char *)name;
- prop->type = SmLISTofARRAY8;
+ prop->type = (char *)SmLISTofARRAY8;
vals = g_array_new (FALSE, FALSE, sizeof (SmPropValue));
@@ -1175,7 +1175,7 @@ ptrarray_prop (const char *name, GPtrArray *values)
prop = g_new (SmProp, 1);
prop->name = (char *)name;
- prop->type = SmLISTofARRAY8;
+ prop->type = (char *)SmLISTofARRAY8;
vals = g_array_new (FALSE, FALSE, sizeof (SmPropValue));
@@ -1205,7 +1205,7 @@ string_prop (const char *name, const char *value)
prop = g_new (SmProp, 1);
prop->name = (char *)name;
- prop->type = SmARRAY8;
+ prop->type = (char *)SmARRAY8;
prop->num_vals = 1;
prop->vals = g_new (SmPropValue, 1);
@@ -1230,7 +1230,7 @@ card8_prop (const char *name, unsigned char value)
prop = g_new (SmProp, 1);
prop->name = (char *)name;
- prop->type = SmCARD8;
+ prop->type = (char *)SmCARD8;
prop->num_vals = 1;
prop->vals = g_new (SmPropValue, 2);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]