[gnome-bluetooth] [PATCH 11/12] trivial: make constant strings 'const char *'
Ladislav Michl
ladis at linux-mips.org
Sun Jan 15 04:48:39 EST 2017
Signed-off-by: Ladislav Michl <ladis at linux-mips.org>
---
libgsm/glibgsmtest.c | 6 +++---
src/ui.c | 10 +++++-----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/libgsm/glibgsmtest.c b/libgsm/glibgsmtest.c
index 7dbcfe0..bf8421c 100644
--- a/libgsm/glibgsmtest.c
+++ b/libgsm/glibgsmtest.c
@@ -37,7 +37,7 @@ message (PhonemgrListener *listener, const char *sender,
g_main_loop_quit (loop);
}
-static char *statuses[] = {
+static const char *statuses[] = {
"PHONEMGR_LISTENER_IDLE",
"PHONEMGR_LISTENER_CONNECTING",
"PHONEMGR_LISTENER_CONNECTED",
@@ -45,14 +45,14 @@ static char *statuses[] = {
"PHONEMGR_LISTENER_ERROR"
};
-static char *call_statutes[] = {
+static const char *call_statutes[] = {
"PHONEMGR_LISTENER_CALL_INCOMING",
"PHONEMGR_LISTENER_CALL_ONGOING",
"PHONEMGR_LISTENER_CALL_IDLE",
"PHONEMGR_LISTENER_CALL_UNKNOWN"
};
-static char *report_statuses[] = {
+static const char *report_statuses[] = {
"PHONEMGR_LISTENER_REPORT_DELIVERED",
"PHONEMGR_LISTENER_REPORT_PENDING",
"PHONEMGR_LISTENER_REPORT_FAILED_TEMPORARY",
diff --git a/src/ui.c b/src/ui.c
index 5831c26..9f91dd5 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* Copyright (C) 2002-2004 Edd Dumbill <edd at usefulinc.com>
* Copyright (C) 2005-2007 Bastien Nocera <hadess at hadess.net>
*
@@ -35,7 +35,7 @@
#define MAX_MESSAGE_LENGTH 160
static char *
-get_resource (MyApp *app, char *uiresname)
+get_resource (MyApp *app, const char *uiresname)
{
char *fname;
@@ -68,7 +68,7 @@ chooser_created (BluetoothChooserButton *button, BluetoothChooser *chooser, gpoi
}
static GtkBuilder *
-get_ui (MyApp *app, char *widget)
+get_ui (MyApp *app, const char *widget)
{
char *fname;
GError* error = NULL;
@@ -80,7 +80,7 @@ get_ui (MyApp *app, char *widget)
ui = gtk_builder_new ();
if (widget != NULL) {
- char *widgets[] = { widget, NULL };
+ char *widgets[] = { (char *)widget, NULL };
if (!gtk_builder_add_objects_from_file (ui, fname, widgets, &error)) {
g_warning ("Couldn't load builder file: %s", error->message);
@@ -204,7 +204,7 @@ static void
populate_prefs (MyApp *app)
{
GtkWidget *w;
- char *widgetname;
+ const char *widgetname;
int ctype;
ctype = gconf_client_get_int (app->client,
--
2.11.0
More information about the gnome-bluetooth
mailing list