summaryrefslogtreecommitdiff
path: root/cpufreq
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2008-12-14 17:46:16 +0000
committerCarlos Garcia Campos <carlosgc@src.gnome.org>2008-12-14 17:46:16 +0000
commit5cbd408164a8a244a7bccf8d35970e72f1858dc9 (patch)
tree48181728f45acc96a31b849afffd549d7f8c7308 /cpufreq
parent1faa42cefa4062c4dc753d98e20d68231eda8bd7 (diff)
Fix several compile warnings.
2008-12-14 Carlos Garcia Campos <carlosgc@gnome.org> * src/cpufreq-monitor-sysfs.c: * src/cpufreq-selector/cpufreq-selector-procfs.c: * src/cpufreq-selector/cpufreq-selector-sysfs.c: * src/cpufreq-utils.c: * src/cpufreq-prefs.c: * src/cpufreq-selector.c: * src/cpufreq-monitor-procfs.c: * src/cpufreq-monitor-cpuinfo.c: Fix several compile warnings. svn path=/trunk/; revision=11153
Diffstat (limited to 'cpufreq')
-rw-r--r--cpufreq/ChangeLog11
-rw-r--r--cpufreq/src/cpufreq-monitor-cpuinfo.c2
-rw-r--r--cpufreq/src/cpufreq-monitor-procfs.c4
-rw-r--r--cpufreq/src/cpufreq-monitor-sysfs.c10
-rw-r--r--cpufreq/src/cpufreq-prefs.c6
-rw-r--r--cpufreq/src/cpufreq-selector.c12
-rw-r--r--cpufreq/src/cpufreq-selector/cpufreq-selector-procfs.c2
-rw-r--r--cpufreq/src/cpufreq-selector/cpufreq-selector-sysfs.c6
-rw-r--r--cpufreq/src/cpufreq-utils.c10
9 files changed, 37 insertions, 26 deletions
diff --git a/cpufreq/ChangeLog b/cpufreq/ChangeLog
index b358ce88b..8fc364f29 100644
--- a/cpufreq/ChangeLog
+++ b/cpufreq/ChangeLog
@@ -1,5 +1,16 @@
2008-12-14 Carlos Garcia Campos <carlosgc@gnome.org>
+ * src/cpufreq-monitor-sysfs.c:
+ * src/cpufreq-selector/cpufreq-selector-procfs.c:
+ * src/cpufreq-selector/cpufreq-selector-sysfs.c:
+ * src/cpufreq-utils.c:
+ * src/cpufreq-prefs.c:
+ * src/cpufreq-selector.c:
+ * src/cpufreq-monitor-procfs.c:
+ * src/cpufreq-monitor-cpuinfo.c: Fix several compile warnings.
+
+2008-12-14 Carlos Garcia Campos <carlosgc@gnome.org>
+
* src/cpufreq-applet.c: (cpufreq_applet_size_request),
(cpufreq_applet_refresh): Fix size requisition. If the applet is
using a vbox in an horixontal panel, the required width is not
diff --git a/cpufreq/src/cpufreq-monitor-cpuinfo.c b/cpufreq/src/cpufreq-monitor-cpuinfo.c
index 4e2d89d52..2c821a4c2 100644
--- a/cpufreq/src/cpufreq-monitor-cpuinfo.c
+++ b/cpufreq/src/cpufreq-monitor-cpuinfo.c
@@ -71,7 +71,7 @@ cpufreq_monitor_cpuinfo_run (CPUFreqMonitor *monitor)
file = g_strdup ("/proc/cpuinfo");
if (!cpufreq_file_get_contents (file, &buffer, NULL, &error)) {
- g_warning (error->message);
+ g_warning ("%s", error->message);
g_error_free (error);
g_free (file);
diff --git a/cpufreq/src/cpufreq-monitor-procfs.c b/cpufreq/src/cpufreq-monitor-procfs.c
index 2fbcf0837..391f0bb8f 100644
--- a/cpufreq/src/cpufreq-monitor-procfs.c
+++ b/cpufreq/src/cpufreq-monitor-procfs.c
@@ -74,7 +74,7 @@ cpufreq_monitor_procfs_get_freq_from_userspace (guint cpu)
path = g_strdup_printf ("/proc/sys/cpu/%u/speed", cpu);
if (!cpufreq_file_get_contents (path, &buffer, NULL, &error)) {
- g_warning (error->message);
+ g_warning ("%s", error->message);
g_error_free (error);
g_free (path);
@@ -115,7 +115,7 @@ cpufreq_monitor_procfs_parse (CPUFreqMonitorProcfs *monitor,
GError *error = NULL;
if (!cpufreq_file_get_contents ("/proc/cpufreq", &buffer, NULL, &error)) {
- g_warning (error->message);
+ g_warning ("%s", error->message);
g_error_free (error);
return FALSE;
diff --git a/cpufreq/src/cpufreq-monitor-sysfs.c b/cpufreq/src/cpufreq-monitor-sysfs.c
index 6afafa676..ac362a3af 100644
--- a/cpufreq/src/cpufreq-monitor-sysfs.c
+++ b/cpufreq/src/cpufreq-monitor-sysfs.c
@@ -98,7 +98,7 @@ cpufreq_monitor_sysfs_constructor (GType type,
frequency = cpufreq_sysfs_read (path, &error);
if (!frequency) {
- g_warning (error->message);
+ g_warning ("%s", error->message);
g_error_free (error);
max_freq = -1;
} else {
@@ -191,7 +191,7 @@ cpufreq_monitor_sysfs_run (CPUFreqMonitor *monitor)
g_object_set (G_OBJECT (monitor), "online", FALSE, NULL);
retval = TRUE;
} else {
- g_warning (error->message);
+ g_warning ("%s", error->message);
}
g_error_free (error);
@@ -218,7 +218,7 @@ cpufreq_monitor_sysfs_run (CPUFreqMonitor *monitor)
frequency = cpufreq_sysfs_read (path, &error);
if (!frequency) {
- g_warning (error->message);
+ g_warning ("%s", error->message);
g_error_free (error);
g_free (path);
g_free (governor);
@@ -274,7 +274,7 @@ cpufreq_monitor_sysfs_get_available_frequencies (CPUFreqMonitor *monitor)
"scaling_available_frequencies");
if (!cpufreq_file_get_contents (path, &buffer, NULL, &error)) {
- g_warning (error->message);
+ g_warning ("%s", error->message);
g_error_free (error);
g_free (path);
@@ -318,7 +318,7 @@ cpufreq_monitor_sysfs_get_available_governors (CPUFreqMonitor *monitor)
"scaling_available_governors");
if (!cpufreq_file_get_contents (path, &buffer, NULL, &error)) {
- g_warning (error->message);
+ g_warning ("%s", error->message);
g_error_free (error);
g_free (path);
diff --git a/cpufreq/src/cpufreq-prefs.c b/cpufreq/src/cpufreq-prefs.c
index 907f74cb6..4c2c11c08 100644
--- a/cpufreq/src/cpufreq-prefs.c
+++ b/cpufreq/src/cpufreq-prefs.c
@@ -284,7 +284,7 @@ cpufreq_prefs_setup (CPUFreqPrefs *prefs)
g_free (key);
/* In case anything went wrong with gconf, get back to the default */
if (error) {
- g_warning (error->message);
+ g_warning ("%s", error->message);
cpu = 0;
g_error_free (error);
error = NULL;
@@ -301,7 +301,7 @@ cpufreq_prefs_setup (CPUFreqPrefs *prefs)
show_mode > CPUFREQ_MODE_BOTH) {
show_mode = CPUFREQ_MODE_BOTH;
if (error) {
- g_warning (error->message);
+ g_warning ("%s", error->message);
g_error_free (error);
error = NULL;
}
@@ -318,7 +318,7 @@ cpufreq_prefs_setup (CPUFreqPrefs *prefs)
show_text_mode > CPUFREQ_MODE_TEXT_PERCENTAGE) {
show_text_mode = CPUFREQ_MODE_TEXT_FREQUENCY_UNIT;
if (error) {
- g_warning (error->message);
+ g_warning ("%s", error->message);
g_error_free (error);
error = NULL;
}
diff --git a/cpufreq/src/cpufreq-selector.c b/cpufreq/src/cpufreq-selector.c
index c1053dab1..48f7fc736 100644
--- a/cpufreq/src/cpufreq-selector.c
+++ b/cpufreq/src/cpufreq-selector.c
@@ -144,7 +144,7 @@ dbus_auth_call_notify_cb (DBusGProxy *proxy,
data = (SelectorAsyncData *)user_data;
if (!dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_BOOLEAN, &gained_privilege, G_TYPE_INVALID)) {
- g_warning (error->message);
+ g_warning ("%s", error->message);
g_error_free (error);
selector_async_data_free (data);
@@ -175,7 +175,7 @@ do_auth_async (SelectorAsyncData *data)
GError *error = NULL;
if (!cpufreq_selector_connect_to_session_bus (data->selector, &error)) {
- g_warning (error->message);
+ g_warning ("%s", error->message);
g_error_free (error);
selector_async_data_free (data);
@@ -220,7 +220,7 @@ dbus_set_call_notify_cb (DBusGProxy *proxy,
}
selector_async_data_free (data);
- g_warning (error->message);
+ g_warning ("%s", error->message);
g_error_free (error);
}
@@ -231,7 +231,7 @@ selector_set_frequency_async (SelectorAsyncData *data)
GError *error = NULL;
if (!cpufreq_selector_connect_to_system_bus (data->selector, &error)) {
- g_warning (error->message);
+ g_warning ("%s", error->message);
g_error_free (error);
selector_async_data_free (data);
@@ -280,7 +280,7 @@ selector_set_governor_async (SelectorAsyncData *data)
GError *error = NULL;
if (!cpufreq_selector_connect_to_system_bus (data->selector, &error)) {
- g_warning (error->message);
+ g_warning ("%s", error->message);
g_error_free (error);
selector_async_data_free (data);
@@ -342,7 +342,7 @@ cpufreq_selector_run_command (CPUFreqSelector *selector,
g_free (command);
if (error) {
- g_warning (error->message);
+ g_warning ("%s", error->message);
g_error_free (error);
}
}
diff --git a/cpufreq/src/cpufreq-selector/cpufreq-selector-procfs.c b/cpufreq/src/cpufreq-selector/cpufreq-selector-procfs.c
index 221755123..057e9fdd6 100644
--- a/cpufreq/src/cpufreq-selector/cpufreq-selector-procfs.c
+++ b/cpufreq/src/cpufreq-selector/cpufreq-selector-procfs.c
@@ -135,7 +135,7 @@ cpufreq_procfs_write (const gchar *path,
return FALSE;
}
- if (g_fprintf (fd, setting) < 0) {
+ if (g_fprintf (fd, "%s", setting) < 0) {
g_set_error (error,
G_FILE_ERROR,
g_file_error_from_errno (errno),
diff --git a/cpufreq/src/cpufreq-selector/cpufreq-selector-sysfs.c b/cpufreq/src/cpufreq-selector/cpufreq-selector-sysfs.c
index 4b18a6ec1..c8fa1e3a2 100644
--- a/cpufreq/src/cpufreq-selector/cpufreq-selector-sysfs.c
+++ b/cpufreq/src/cpufreq-selector/cpufreq-selector-sysfs.c
@@ -142,7 +142,7 @@ cpufreq_sysfs_write (const gchar *path,
return FALSE;
}
- if (g_fprintf (fd, setting) < 0) {
+ if (g_fprintf (fd, "%s", setting) < 0) {
g_set_error (error,
G_FILE_ERROR,
g_file_error_from_errno (errno),
@@ -197,7 +197,7 @@ cpufreq_selector_sysfs_get_freqs (CPUFreqSelectorSysfs *selector)
buffer = cpufreq_sysfs_read (path, &error);
if (!buffer) {
- g_warning (error->message);
+ g_warning ("%s", error->message);
g_error_free (error);
g_free (path);
@@ -343,7 +343,7 @@ cpufreq_selector_sysfs_get_govs (CPUFreqSelectorSysfs *selector)
buffer = cpufreq_sysfs_read (path, &error);
if (!buffer) {
- g_warning (error->message);
+ g_warning ("%s", error->message);
g_error_free (error);
g_free (path);
diff --git a/cpufreq/src/cpufreq-utils.c b/cpufreq/src/cpufreq-utils.c
index 944906642..9c8cc2374 100644
--- a/cpufreq/src/cpufreq-utils.c
+++ b/cpufreq/src/cpufreq-utils.c
@@ -94,10 +94,10 @@ cpufreq_utils_display_error (const gchar *message,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_OK,
- message);
+ "%s", message);
if (secondary) {
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
- secondary);
+ "%s", secondary);
}
gtk_window_set_title (GTK_WINDOW (dialog), ""); /* as per HIG */
@@ -162,7 +162,7 @@ selector_is_available (const gchar *action)
if (!system_bus) {
system_bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
if (!system_bus) {
- g_warning (error->message);
+ g_warning ("%s", error->message);
g_error_free (error);
return FALSE;
@@ -181,7 +181,7 @@ selector_is_available (const gchar *action)
pk_context = NULL;
if (polkit_error_is_set (pk_error)) {
- g_warning (polkit_error_get_error_message (pk_error));
+ g_warning ("%s", polkit_error_get_error_message (pk_error));
polkit_error_free (pk_error);
} else {
g_warning ("Cannot initialize libpolkit");
@@ -210,7 +210,7 @@ selector_is_available (const gchar *action)
polkit_action_unref (pk_action);
if (polkit_error_is_set (pk_error)) {
- g_warning (polkit_error_get_error_message (pk_error));
+ g_warning ("%s", polkit_error_get_error_message (pk_error));
polkit_error_free (pk_error);
return FALSE;