Commit graph

16 commits

Author SHA1 Message Date
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
Ralf Habacker
92c39d1d8a Fix of 'warning: variable ‘..‘ set but not used [-Wunused-but-set-variable]'.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89284
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-03-17 16:52:51 +01:00
Ralf Habacker
bc02680c69 Fixed compiler warning on windows.
https://bugs.freedesktop.org/show_bug.cgi?id=61874
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-08-19 21:29:26 +02:00
Wolfgang Baron
2a50cb475b Fix launching of dbus-daemon on Windows in paths containing spaces
If dbus is installed in a path, which contains a space, dbus-launch will
not launch the daemon. That is so, because a command line is built from
just the path to the daemon and a parameter. The path has to be
surrounded with quotes. This can be done unconditionally, because the
quotes do not cause any trouble even if they are not needed.

Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=49450
2012-07-18 18:10:07 +01:00
Ralf Habacker
da3578a1a7 Cleanup debug messages. 2010-05-03 11:56:40 +02:00
Marcus Brinkmann
f041773df2 Port dbus tools to Windows CE. 2010-04-13 20:58:20 +02:00
Romain Pokrzywka
1cd84d8258 remove DBUS_DAEMON_EXECUTABLE_NAME, we already have DBUS_DAEMON_NAME, and use the specified name for the executable when building with cmake 2010-02-07 00:32:46 +01:00
Ralf Habacker
85efbce5d6 completed notes 2009-11-30 12:14:24 +01:00
Tor Lillqvist
b5c8483f44 tools/dbus-launch-win.c: TODO++ (cherry picked from commit 0f5dbec6407975d6a93fbb2cbcd58ab192961cf8) 2009-11-30 12:04:59 +01:00
Tor Lillqvist
14aca8b73b tools/dbus-launch-win.c: strrchr -> _mbsrchr (cherry picked from commit b8b9fc300242ff25071df4166173baae7d2b4f0f) 2009-11-30 12:00:17 +01:00
Tor Lillqvist
73749944e3 tools/dbus-launch-win.c: fix typo (cherry picked from commit 81a7a0e9309e5929857fdf44b8b51a4f8df097e6) 2009-11-30 12:00:14 +01:00
Christian Ehrlicher
722a90c9cb all changes for dbus-1.2 API (cherry picked from commit 6734a3210a0705e3ab01ee123fac275799877353) 2009-11-30 10:23:54 +01:00
Tobias Mueller
5baf2f856a Bug 21161 - Update the FSF address
No comment.

Signed-off-by: Colin Walters <walters@verbum.org>
2009-07-10 19:32:38 -04:00
Havoc Pennington
d012387afe 2007-07-13 Havoc Pennington <hp@redhat.com>
* Add indent-tabs-mode: nil to all file headers.
2007-07-14 02:44:01 +00:00
Ralf Habacker
3410f135ae * dbus/dbus-sysdeps-util-win.c, tools/dbus-launch-win.c: msvc7.1 fixes by Jaroslaw Staniek tested with mingw 2007-06-19 20:12:11 +00:00
Ralf Habacker
081b2cd68e * tools/dbus-launch-win.c: new file, replaces script wrapper on win32 2007-06-01 22:24:57 +00:00