mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-01-09 18:00:20 +01:00
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 |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| ci-build.sh | ||
| dbus-cleanup-sockets.c | ||
| dbus-echo.c | ||
| dbus-launch-win.c | ||
| dbus-launch-x11.c | ||
| dbus-launch.c | ||
| dbus-launch.h | ||
| dbus-monitor.c | ||
| dbus-print-message.c | ||
| dbus-print-message.h | ||
| dbus-run-session.c | ||
| dbus-send.c | ||
| dbus-spam.c | ||
| dbus-update-activation-environment.c | ||
| dbus-uuidgen.c | ||
| GetAllMatchRules.py | ||
| Makefile.am | ||
| run-with-tmp-session-bus.sh | ||
| strtoll.c | ||
| strtoull.c | ||
| test-tool.c | ||
| test-tool.h | ||
| tool-common.c | ||
| tool-common.h | ||