dbus/test/name-test
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 run-with-tmp-session-bus.sh: create a unique temporary file per process 2013-09-05 12:35:11 +01:00
Makefile.am name-test, tools: add missing COVERAGE_CFLAGS 2016-08-15 15:17:31 +01:00
run-test-systemserver.sh Run name-test tests under the TAP driver 2015-04-16 13:06:32 +01:00
run-test.sh name-test: run most C tests directly, not via run-test.sh 2016-02-12 15:26:33 +00:00
test-activation-forking.py Use pygi instead of pygobject 2 2015-01-27 14:29:59 +00:00
test-autolaunch.c Don't assume that X11 autolaunch will work if DISPLAY is unset 2013-09-13 14:59:17 +01:00
test-ids.c name-test C tests: produce structured (TAP) output 2016-02-12 15:26:30 +00:00
test-pending-call-dispatch.c Be more const-correct 2016-10-13 17:20:28 +01:00
test-pending-call-timeout.c Be more const-correct 2016-10-13 17:20:28 +01:00
test-privserver-client.c various tests: produce better diagnostics on error 2016-08-12 10:25:06 +01:00
test-privserver.c name-test C tests: produce structured (TAP) output 2016-02-12 15:26:30 +00:00
test-shutdown.c name-test C tests: produce structured (TAP) output 2016-02-12 15:26:30 +00:00
test-threads-init.c Be more const-correct 2016-10-13 17:20:28 +01:00
test-wait-for-echo.py Use pygi instead of pygobject 2 2015-01-27 14:29:59 +00:00
tmp-session-like-system.conf test-bus: don't write to the syslog 2016-08-11 16:41:16 +01:00