dbus/tools
Simon McVittie 8db5ca900f Be more const-correct
As a general design principle, strings that we aren't going to modify
should usually be const. When compiling with -Wwrite-strings, quoted
string constants are of type "const char *", causing compiler warnings
when they are assigned to char * variables.

Unfortunately, we need to add casts in a few places:

* _dbus_list_append(), _dbus_test_oom_handling() and similar generic
  "user-data" APIs take a void *, not a const void *, so we have
  to cast
* For historical reasons the execve() family of functions take a
  (char * const *), i.e. a constant pointer to an array of mutable
  strings, so again we have to cast
* _dbus_spawn_async_with_babysitter similarly takes a char **,
  although we can make it a little more const-correct by making it
  take (char * const *) like execve() does

This also incorporates a subsequent patch by Thomas Zimmermann to
put various string constants in static storage, which is a little
more efficient.

Signed-off-by: Simon McVittie <smcv@debian.org>
Reviewed-by: Thomas Zimmermann <tdz@users.sourceforge.net>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=97357
2016-10-13 17:20:28 +01:00
..
.gitignore Add dbus-test-tool, currently with "echo" and "spam" modes 2014-10-14 13:53:54 +01:00
ci-build.sh Rename distro-style CI build from "release" to "production" 2016-10-10 15:13:01 +01:00
dbus-cleanup-sockets.c dbus-cleanup-sockets: free list of socket entries 2011-01-17 12:18:40 +00:00
dbus-echo.c dbus-test-tool echo: fix sleep documentation 2016-03-02 18:19:35 +00:00
dbus-launch-win.c Be more const-correct 2016-10-13 17:20:28 +01:00
dbus-launch-x11.c Be more const-correct 2016-10-13 17:20:28 +01:00
dbus-launch.c Fix warnings from compiler option '-Wsuggest-attribute=noreturn' 2016-10-10 15:11:24 +01:00
dbus-launch.h Fix warnings from compiler option '-Wsuggest-attribute=noreturn' 2016-10-10 15:11:24 +01:00
dbus-monitor.c dbus-monitor: disable automatic handling of o.fd.Peer messages 2015-07-21 16:50:48 +01:00
dbus-print-message.c Consistently use socklen_t for getsockname, getsockopt etc. 2016-02-11 02:04:53 +01:00
dbus-print-message.h dbus-monitor: Add timestamp to --monitor mode. 2015-02-24 13:29:45 +00:00
dbus-run-session.c dbus-run-session: remove various extra variables from the environment 2013-08-23 11:41:16 +01:00
dbus-send.c Fix warnings from compiler option '-Wshadow' 2016-10-10 18:04:09 +01:00
dbus-spam.c Fix warning: "pointer targets in assignment differ in signedness [-Wpointer-sign]". 2015-11-24 12:26:00 +01:00
dbus-update-activation-environment.c update-activation-environment: produce better diagnostics on error 2016-08-12 09:50:00 +01:00
dbus-uuidgen.c Be more const-correct 2016-10-13 17:20:28 +01:00
GetAllMatchRules.py GetAllMatchRules: provide an example how it could be used 2014-10-06 12:10:51 +01:00
Makefile.am name-test, tools: add missing COVERAGE_CFLAGS 2016-08-15 15:17:31 +01:00
run-with-tmp-session-bus.sh Replace $DBUS_USE_TEST_BINARY with $DBUS_TEST_DBUS_LAUNCH 2016-02-12 15:26:23 +00:00
strtoll.c Include config.h as the first thing in every .c file 2013-02-22 13:08:27 +00:00
strtoull.c Include config.h as the first thing in every .c file 2013-02-22 13:08:27 +00:00
test-tool.c dbus-test-tool: add black-hole mode 2014-10-14 13:53:59 +01:00
test-tool.h dbus-test-tool: add black-hole mode 2014-10-14 13:53:59 +01:00
tool-common.c Drop duplicated function tool_millisleep() and use dbus_sleep_milliseconds() instead. 2015-03-04 13:06:49 +01:00
tool-common.h Drop duplicated function tool_millisleep() and use dbus_sleep_milliseconds() instead. 2015-03-04 13:06:49 +01:00