[glib] More const-correctness fixes
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] More const-correctness fixes
- Date: Thu, 26 Apr 2018 14:37:50 +0000 (UTC)
commit 9365e212f8007412a9221d5240c82080ed3ede93
Author: Philip Withnall <withnall endlessm com>
Date: Thu Apr 26 15:34:55 2018 +0100
More const-correctness fixes
This continues one of the const-correctness fixes from the previous
commit (it needed some more transitive fixes), and reverts another of
them, since it was over-zealous.
This fixes CI failure: https://gitlab.gnome.org/GNOME/glib/-/jobs/27125.
Signed-off-by: Philip Withnall <withnall endlessm com>
Reviewed-by: nobody
gio/tests/file.c | 2 +-
glib/gbacktrace.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gio/tests/file.c b/gio/tests/file.c
index baf0bd745..919f8f598 100644
--- a/gio/tests/file.c
+++ b/gio/tests/file.c
@@ -153,7 +153,7 @@ typedef struct
gint monitor_created;
gint monitor_deleted;
gint monitor_changed;
- const gchar *monitor_path;
+ gchar *monitor_path;
gint pos;
const gchar *data;
gchar *buffer;
diff --git a/glib/gbacktrace.c b/glib/gbacktrace.c
index 5300c6838..d29f4fad6 100644
--- a/glib/gbacktrace.c
+++ b/glib/gbacktrace.c
@@ -81,7 +81,7 @@
#ifndef G_OS_WIN32
-static void stack_trace (char **args);
+static void stack_trace (const char * const *args);
#endif
/* People want to hit this from their debugger... */
@@ -269,7 +269,7 @@ stack_trace_sigchld (int signum)
}
static void
-stack_trace (char **args)
+stack_trace (const char * const *args)
{
pid_t pid;
int in_fd[2];
@@ -301,7 +301,7 @@ stack_trace (char **args)
close (1); dup (out_fd[1]); /* set the stdout to the out pipe */
close (2); dup (out_fd[1]); /* set the stderr to the out pipe */
- execvp (args[0], args); /* exec gdb */
+ execvp (args[0], (char **) args); /* exec gdb */
/* Print failure to original stderr */
close (2); dup (old_err);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]