Commit f1cd229f authored by Simon McVittie's avatar Simon McVittie

Remove trailing newlines from _dbus_warn, _dbus_warn_check_failed

They used to be needed, but are not needed any more, and we were
never completely consistent about including them in any case.
Signed-off-by: default avatarSimon McVittie <smcv@debian.org>
parent b8abdc52
......@@ -370,14 +370,14 @@ check_return_values (const DBusString *full_path)
user = bus_config_parser_get_user (parser);
if (user == NULL)
{
_dbus_warn ("User was NULL!\n");
_dbus_warn ("User was NULL!");
goto finish;
}
#if 0
/* the username can be configured in configure.in so this test doesn't work */
if (strcmp (user, "dbus") != 0)
{
_dbus_warn ("User was invalid; '%s'!\n", user);
_dbus_warn ("User was invalid; '%s'!", user);
goto finish;
}
printf (" <user>dbus</user> OKAY!\n");
......@@ -387,12 +387,12 @@ check_return_values (const DBusString *full_path)
type = bus_config_parser_get_type (parser);
if (type == NULL)
{
_dbus_warn ("Type was NULL!\n");
_dbus_warn ("Type was NULL!");
goto finish;
}
if (strcmp (type, "system") != 0)
{
_dbus_warn ("Type was invalid; '%s'!\n", user);
_dbus_warn ("Type was invalid; '%s'!", user);
goto finish;
}
printf (" <type>system</type> OKAY!\n");
......@@ -401,7 +401,7 @@ check_return_values (const DBusString *full_path)
dirs = bus_config_parser_get_service_dirs (parser);
if (dirs == NULL)
{
_dbus_warn ("Service dirs are NULL!\n");
_dbus_warn ("Service dirs are NULL!");
goto finish;
}
printf (" <standard_system_service_dirs/> OKAY!\n");
......@@ -440,7 +440,7 @@ do_load (const DBusString *full_path,
}
else if (validity == VALID)
{
_dbus_warn ("Failed to load valid file but still had memory: %s\n",
_dbus_warn ("Failed to load valid file but still had memory: %s",
error.message);
dbus_error_free (&error);
......@@ -460,7 +460,7 @@ do_load (const DBusString *full_path,
if (validity == INVALID)
{
_dbus_warn ("Accepted invalid file\n");
_dbus_warn ("Accepted invalid file");
return FALSE;
}
......@@ -516,7 +516,7 @@ process_test_valid_subdir (const DBusString *test_base_dir,
dir = _dbus_directory_open (&test_directory, &error);
if (dir == NULL)
{
_dbus_warn ("Could not open %s: %s\n",
_dbus_warn ("Could not open %s: %s",
_dbus_string_get_const_data (&test_directory),
error.message);
dbus_error_free (&error);
......@@ -576,7 +576,7 @@ process_test_valid_subdir (const DBusString *test_base_dir,
if (dbus_error_is_set (&error))
{
_dbus_warn ("Could not get next file in %s: %s\n",
_dbus_warn ("Could not get next file in %s: %s",
_dbus_string_get_const_data (&test_directory),
error.message);
dbus_error_free (&error);
......
......@@ -1049,7 +1049,7 @@ start_busconfig_child (BusConfigParser *parser,
&e->d.policy.gid_uid_or_at_console))
e->d.policy.type = POLICY_USER;
else
_dbus_warn ("Unknown username \"%s\" in message bus configuration file\n",
_dbus_warn ("Unknown username \"%s\" in message bus configuration file",
user);
}
else if (group != NULL)
......@@ -1061,7 +1061,7 @@ start_busconfig_child (BusConfigParser *parser,
&e->d.policy.gid_uid_or_at_console))
e->d.policy.type = POLICY_GROUP;
else
_dbus_warn ("Unknown group \"%s\" in message bus configuration file\n",
_dbus_warn ("Unknown group \"%s\" in message bus configuration file",
group);
}
else if (at_console != NULL)
......@@ -1581,7 +1581,7 @@ append_rule_from_element (BusConfigParser *parser,
}
else
{
_dbus_warn ("Unknown username \"%s\" on element <%s>\n",
_dbus_warn ("Unknown username \"%s\" on element <%s>",
user, element_name);
}
}
......@@ -1613,7 +1613,7 @@ append_rule_from_element (BusConfigParser *parser,
}
else
{
_dbus_warn ("Unknown group \"%s\" on element <%s>\n",
_dbus_warn ("Unknown group \"%s\" on element <%s>",
group, element_name);
}
}
......@@ -2840,12 +2840,12 @@ do_check_own_rules (BusPolicy *policy)
ret ? "allowed" : "not allowed");
if (checks[i].allowed && !ret)
{
_dbus_warn ("Cannot own %s\n", checks[i].name);
_dbus_warn ("Cannot own %s", checks[i].name);
return FALSE;
}
if (!checks[i].allowed && ret)
{
_dbus_warn ("Can own %s\n", checks[i].name);
_dbus_warn ("Can own %s", checks[i].name);
return FALSE;
}
_dbus_string_free (&service_name);
......@@ -2881,7 +2881,7 @@ do_load (const DBusString *full_path,
}
else if (validity == VALID)
{
_dbus_warn ("Failed to load valid file but still had memory: %s\n",
_dbus_warn ("Failed to load valid file but still had memory: %s",
error.message);
dbus_error_free (&error);
......@@ -2906,7 +2906,7 @@ do_load (const DBusString *full_path,
if (validity == INVALID)
{
_dbus_warn ("Accepted invalid file\n");
_dbus_warn ("Accepted invalid file");
return FALSE;
}
......@@ -2963,7 +2963,7 @@ process_test_valid_subdir (const DBusString *test_base_dir,
dir = _dbus_directory_open (&test_directory, &error);
if (dir == NULL)
{
_dbus_warn ("Could not open %s: %s\n",
_dbus_warn ("Could not open %s: %s",
_dbus_string_get_const_data (&test_directory),
error.message);
dbus_error_free (&error);
......@@ -3025,7 +3025,7 @@ process_test_valid_subdir (const DBusString *test_base_dir,
if (dbus_error_is_set (&error))
{
_dbus_warn ("Could not get next file in %s: %s\n",
_dbus_warn ("Could not get next file in %s: %s",
_dbus_string_get_const_data (&test_directory),
error.message);
dbus_error_free (&error);
......@@ -3236,7 +3236,7 @@ all_are_equiv (const DBusString *target_directory)
dir = _dbus_directory_open (target_directory, &error);
if (dir == NULL)
{
_dbus_warn ("Could not open %s: %s\n",
_dbus_warn ("Could not open %s: %s",
_dbus_string_get_const_data (target_directory),
error.message);
dbus_error_free (&error);
......@@ -3273,7 +3273,7 @@ all_are_equiv (const DBusString *target_directory)
if (parser == NULL)
{
_dbus_warn ("Could not load file %s: %s\n",
_dbus_warn ("Could not load file %s: %s",
_dbus_string_get_const_data (&full_path),
error.message);
_dbus_string_free (&full_path);
......@@ -3342,7 +3342,7 @@ process_test_equiv_subdir (const DBusString *test_base_dir,
dir = _dbus_directory_open (&test_directory, &error);
if (dir == NULL)
{
_dbus_warn ("Could not open %s: %s\n",
_dbus_warn ("Could not open %s: %s",
_dbus_string_get_const_data (&test_directory),
error.message);
dbus_error_free (&error);
......
......@@ -157,7 +157,7 @@ _set_watched_dirs_internal (DBusList **directories)
/* Not all service directories need to exist. */
if (errno != ENOENT)
{
_dbus_warn ("Cannot setup inotify for '%s'; error '%s'\n", new_dirs[i], _dbus_strerror (errno));
_dbus_warn ("Cannot setup inotify for '%s'; error '%s'", new_dirs[i], _dbus_strerror (errno));
goto out;
}
else
......@@ -236,7 +236,7 @@ _init_inotify (BusContext *context)
#endif
if (inotify_fd <= 0)
{
_dbus_warn ("Cannot initialize inotify\n");
_dbus_warn ("Cannot initialize inotify");
goto out;
}
......@@ -252,7 +252,7 @@ _init_inotify (BusContext *context)
if (watch == NULL)
{
_dbus_warn ("Unable to create inotify watch\n");
_dbus_warn ("Unable to create inotify watch");
goto out;
}
......
......@@ -137,7 +137,7 @@ _init_kqueue (BusContext *context)
kq = kqueue ();
if (kq < 0)
{
_dbus_warn ("Cannot create kqueue; error '%s'\n", _dbus_strerror (errno));
_dbus_warn ("Cannot create kqueue; error '%s'", _dbus_strerror (errno));
goto out;
}
......@@ -149,7 +149,7 @@ _init_kqueue (BusContext *context)
if (watch == NULL)
{
_dbus_warn ("Unable to create kqueue watch\n");
_dbus_warn ("Unable to create kqueue watch");
goto out1;
}
......@@ -276,7 +276,7 @@ bus_set_watched_dirs (BusContext *context, DBusList **directories)
{
if (errno != ENOENT)
{
_dbus_warn ("Cannot open directory '%s'; error '%s'\n", new_dirs[i], _dbus_strerror (errno));
_dbus_warn ("Cannot open directory '%s'; error '%s'", new_dirs[i], _dbus_strerror (errno));
goto out;
}
else
......@@ -297,7 +297,7 @@ bus_set_watched_dirs (BusContext *context, DBusList **directories)
NOTE_DELETE | NOTE_EXTEND | NOTE_WRITE | NOTE_RENAME, 0, 0);
if (kevent (kq, &ev, 1, NULL, 0, NULL) == -1)
{
_dbus_warn ("Cannot setup a kevent for '%s'; error '%s'\n", new_dirs[i], _dbus_strerror (errno));
_dbus_warn ("Cannot setup a kevent for '%s'; error '%s'", new_dirs[i], _dbus_strerror (errno));
close (fd);
goto out;
}
......
This diff is collapsed.
......@@ -190,7 +190,7 @@ introspect (void)
exit (0);
oom:
_dbus_warn ("Can not introspect - Out of memory\n");
_dbus_warn ("Can not introspect - Out of memory");
exit (1);
}
......@@ -259,7 +259,7 @@ handle_reload_watch (DBusWatch *watch,
if ((reload_pipe[RELOAD_READ_END].fd > 0) &&
_dbus_read_socket (reload_pipe[RELOAD_READ_END], &str, 1) != 1)
{
_dbus_warn ("Couldn't read from reload pipe.\n");
_dbus_warn ("Couldn't read from reload pipe.");
close_reload_pipe (&watch);
return TRUE;
}
......@@ -285,7 +285,7 @@ handle_reload_watch (DBusWatch *watch,
_DBUS_ASSERT_ERROR_IS_SET (&error);
_dbus_assert (dbus_error_has_name (&error, DBUS_ERROR_FAILED) ||
dbus_error_has_name (&error, DBUS_ERROR_NO_MEMORY));
_dbus_warn ("Unable to reload configuration: %s\n",
_dbus_warn ("Unable to reload configuration: %s",
error.message);
dbus_error_free (&error);
}
......@@ -326,7 +326,7 @@ setup_reload_pipe (DBusLoop *loop)
if (!_dbus_socketpair (&reload_pipe[0], &reload_pipe[1],
TRUE, &error))
{
_dbus_warn ("Unable to create reload pipe: %s\n",
_dbus_warn ("Unable to create reload pipe: %s",
error.message);
dbus_error_free (&error);
exit (1);
......@@ -338,7 +338,7 @@ setup_reload_pipe (DBusLoop *loop)
if (watch == NULL)
{
_dbus_warn ("Unable to create reload watch: %s\n",
_dbus_warn ("Unable to create reload watch: %s",
error.message);
dbus_error_free (&error);
exit (1);
......@@ -346,7 +346,7 @@ setup_reload_pipe (DBusLoop *loop)
if (!_dbus_loop_add_watch (loop, watch))
{
_dbus_warn ("Unable to add reload watch to main loop: %s\n",
_dbus_warn ("Unable to add reload watch to main loop: %s",
error.message);
dbus_error_free (&error);
exit (1);
......@@ -659,13 +659,13 @@ main (int argc, char **argv)
if (!bus_selinux_pre_init ())
{
_dbus_warn ("SELinux pre-initialization failed\n");
_dbus_warn ("SELinux pre-initialization failed");
exit (1);
}
if (!bus_apparmor_pre_init ())
{
_dbus_warn ("AppArmor pre-initialization failed: out of memory\n");
_dbus_warn ("AppArmor pre-initialization failed: out of memory");
exit (1);
}
......@@ -677,7 +677,7 @@ main (int argc, char **argv)
_dbus_string_free (&config_file);
if (context == NULL)
{
_dbus_warn ("Failed to start message bus: %s\n",
_dbus_warn ("Failed to start message bus: %s",
error.message);
dbus_error_free (&error);
exit (1);
......
......@@ -205,7 +205,7 @@ avc_create_thread (void (*run) (void))
rc = pthread_create (&avc_notify_thread, NULL, (void *(*) (void *)) run, NULL);
if (rc != 0)
{
_dbus_warn ("Failed to start AVC thread: %s\n", _dbus_strerror (rc));
_dbus_warn ("Failed to start AVC thread: %s", _dbus_strerror (rc));
exit (1);
}
return &avc_notify_thread;
......@@ -227,7 +227,7 @@ avc_alloc_lock (void)
avc_mutex = dbus_new (pthread_mutex_t, 1);
if (avc_mutex == NULL)
{
_dbus_warn ("Could not create mutex: %s\n", _dbus_strerror (errno));
_dbus_warn ("Could not create mutex: %s", _dbus_strerror (errno));
exit (1);
}
pthread_mutex_init (avc_mutex, NULL);
......@@ -286,7 +286,7 @@ bus_selinux_pre_init (void)
r = is_selinux_enabled ();
if (r < 0)
{
_dbus_warn ("Could not tell if SELinux is enabled: %s\n",
_dbus_warn ("Could not tell if SELinux is enabled: %s",
_dbus_strerror (errno));
return FALSE;
}
......@@ -339,7 +339,7 @@ bus_selinux_full_init (void)
if (selinux_set_mapping (dbus_map) < 0)
{
_dbus_warn ("Failed to set up security class mapping (selinux_set_mapping():%s).\n",
_dbus_warn ("Failed to set up security class mapping (selinux_set_mapping():%s).",
strerror (errno));
return FALSE;
}
......@@ -347,7 +347,7 @@ bus_selinux_full_init (void)
avc_entry_ref_init (&aeref);
if (avc_init ("avc", &mem_cb, &log_cb, &thread_cb, &lock_cb) < 0)
{
_dbus_warn ("Failed to start Access Vector Cache (AVC).\n");
_dbus_warn ("Failed to start Access Vector Cache (AVC).");
return FALSE;
}
else
......@@ -358,7 +358,7 @@ bus_selinux_full_init (void)
if (avc_add_callback (policy_reload_callback, AVC_CALLBACK_RESET,
NULL, NULL, 0, 0) < 0)
{
_dbus_warn ("Failed to add policy reload callback: %s\n",
_dbus_warn ("Failed to add policy reload callback: %s",
_dbus_strerror (errno));
avc_destroy ();
return FALSE;
......@@ -769,7 +769,7 @@ bus_selinux_init_connection_id (DBusConnection *connection,
"Error getting SID from context \"%s\": %s\n",
con, _dbus_strerror (errno));
_dbus_warn ("Error getting SID from context \"%s\": %s\n",
_dbus_warn ("Error getting SID from context \"%s\": %s",
con, _dbus_strerror (errno));
freecon (con);
......@@ -850,7 +850,7 @@ bus_selinux_id_table_insert (DBusHashTable *service_table,
return FALSE;
}
_dbus_warn ("Error getting SID from context \"%s\": %s\n",
_dbus_warn ("Error getting SID from context \"%s\": %s",
(char *) service_context,
_dbus_strerror (errno));
goto out;
......
......@@ -2201,7 +2201,7 @@ check_parse (dbus_bool_t should_succeed,
if (should_succeed && rule == NULL)
{
_dbus_warn ("Failed to parse: %s: %s: \"%s\"\n",
_dbus_warn ("Failed to parse: %s: %s: \"%s\"",
error.name, error.message,
_dbus_string_get_const_data (&str));
exit (1);
......@@ -2209,7 +2209,7 @@ check_parse (dbus_bool_t should_succeed,
if (!should_succeed && rule != NULL)
{
_dbus_warn ("Failed to fail to parse: \"%s\"\n",
_dbus_warn ("Failed to fail to parse: \"%s\"",
_dbus_string_get_const_data (&str));
exit (1);
}
......@@ -2549,7 +2549,7 @@ test_equality (void)
if (!match_rule_equal (first, second))
{
_dbus_warn ("rule %s and %s should have been equal\n",
_dbus_warn ("rule %s and %s should have been equal",
equality_tests[i].first,
equality_tests[i].second);
exit (1);
......@@ -2584,7 +2584,7 @@ test_equality (void)
if (match_rule_equal (first, second))
{
_dbus_warn ("rule %s and %s should not have been equal\n",
_dbus_warn ("rule %s and %s should not have been equal",
equality_tests[i].first,
equality_tests[j].second);
exit (1);
......@@ -2694,7 +2694,7 @@ check_matches (dbus_bool_t expected_to_match,
if (matched != expected_to_match)
{
_dbus_warn ("Expected rule %s to %s message %d, failed\n",
_dbus_warn ("Expected rule %s to %s message %d, failed",
rule_text, expected_to_match ?
"match" : "not match", number);
exit (1);
......@@ -2823,7 +2823,7 @@ test_path_match (int type,
if (matched != should_match)
{
_dbus_warn ("Expected rule %s to %s message "
"with first arg %s of type '%c', failed\n",
"with first arg %s of type '%c', failed",
rule_text,
should_match ? "match" : "not match",
path,
......
......@@ -49,7 +49,7 @@ check_memleaks (const char *name)
printf ("%s: checking for memleaks\n", name);
if (_dbus_get_malloc_blocks_outstanding () != 0)
{
_dbus_warn ("%d dbus_malloc blocks were not freed\n",
_dbus_warn ("%d dbus_malloc blocks were not freed",
_dbus_get_malloc_blocks_outstanding ());
die ("memleaks");
}
......@@ -81,7 +81,7 @@ bus_activation_helper_oom_test (void *data)
/* we failed, but a OOM is good */
if (!dbus_error_has_name (&error, DBUS_ERROR_NO_MEMORY))
{
_dbus_warn ("FAILED SELF TEST: Error: %s\n", error.message);
_dbus_warn ("FAILED SELF TEST: Error: %s", error.message);
retval = FALSE;
}
dbus_error_free (&error);
......
......@@ -54,7 +54,7 @@ check_memleaks (const char *name)
printf ("%s: checking for memleaks\n", name);
if (_dbus_get_malloc_blocks_outstanding () != 0)
{
_dbus_warn ("%d dbus_malloc blocks were not freed\n",
_dbus_warn ("%d dbus_malloc blocks were not freed",
_dbus_get_malloc_blocks_outstanding ());
die ("memleaks");
}
......
......@@ -48,7 +48,7 @@ check_memleaks (const char *name)
printf ("%s: checking for memleaks\n", name);
if (_dbus_get_malloc_blocks_outstanding () != 0)
{
_dbus_warn ("%d dbus_malloc blocks were not freed\n",
_dbus_warn ("%d dbus_malloc blocks were not freed",
_dbus_get_malloc_blocks_outstanding ());
die ("memleaks");
}
......
......@@ -270,14 +270,14 @@ bus_context_new_test (const DBusString *test_data_dir,
if (!_dbus_string_init (&config_file))
{
_dbus_warn ("No memory\n");
_dbus_warn ("No memory");
return NULL;
}
if (!_dbus_string_copy (test_data_dir, 0,
&config_file, 0))
{
_dbus_warn ("No memory\n");
_dbus_warn ("No memory");
_dbus_string_free (&config_file);
return NULL;
}
......@@ -286,7 +286,7 @@ bus_context_new_test (const DBusString *test_data_dir,
if (!_dbus_concat_dir_and_file (&config_file, &relative))
{
_dbus_warn ("No memory\n");
_dbus_warn ("No memory");
_dbus_string_free (&config_file);
return NULL;
}
......@@ -297,7 +297,7 @@ bus_context_new_test (const DBusString *test_data_dir,
{
_DBUS_ASSERT_ERROR_IS_SET (&error);
_dbus_warn ("Failed to create debug bus context from configuration file %s: %s\n",
_dbus_warn ("Failed to create debug bus context from configuration file %s: %s",
filename, error.message);
dbus_error_free (&error);
......
......@@ -717,7 +717,7 @@ _dbus_address_test (void)
if (strcmp (escaped, test->escaped) != 0)
{
_dbus_warn ("Escaped '%s' as '%s' should have been '%s'\n",
_dbus_warn ("Escaped '%s' as '%s' should have been '%s'",
test->unescaped, escaped, test->escaped);
exit (1);
}
......@@ -726,7 +726,7 @@ _dbus_address_test (void)
unescaped = dbus_address_unescape_value (test->escaped, &error);
if (unescaped == NULL)
{
_dbus_warn ("Failed to unescape '%s': %s\n",
_dbus_warn ("Failed to unescape '%s': %s",
test->escaped, error.message);
dbus_error_free (&error);
exit (1);
......@@ -734,7 +734,7 @@ _dbus_address_test (void)
if (strcmp (unescaped, test->unescaped) != 0)
{
_dbus_warn ("Unescaped '%s' as '%s' should have been '%s'\n",
_dbus_warn ("Unescaped '%s' as '%s' should have been '%s'",
test->escaped, unescaped, test->unescaped);
exit (1);
}
......@@ -752,7 +752,7 @@ _dbus_address_test (void)
&error);
if (unescaped != NULL)
{
_dbus_warn ("Should not have successfully unescaped '%s' to '%s'\n",
_dbus_warn ("Should not have successfully unescaped '%s' to '%s'",
invalid_escaped_values[i], unescaped);
dbus_free (unescaped);
exit (1);
......
This diff is collapsed.
......@@ -69,7 +69,7 @@ process_test_subdir (const DBusString *test_base_dir,
dir = _dbus_directory_open (&test_directory, &error);
if (dir == NULL)
{
_dbus_warn ("Could not open %s: %s\n",
_dbus_warn ("Could not open %s: %s",
_dbus_string_get_const_data (&test_directory),
error.message);
dbus_error_free (&error);
......@@ -113,7 +113,7 @@ process_test_subdir (const DBusString *test_base_dir,
if (dbus_error_is_set (&error))
{
_dbus_warn ("Could not get next file in %s: %s\n",
_dbus_warn ("Could not get next file in %s: %s",
_dbus_string_get_const_data (&test_directory), error.message);
dbus_error_free (&error);
goto failed;
......
......@@ -105,7 +105,7 @@ addresses_shutdown_func (void *data)
while (i < N_BUS_TYPES)
{
if (bus_connections[i] != NULL)
_dbus_warn_check_failed ("dbus_shutdown() called but connections were still live. This probably means the application did not drop all its references to bus connections.\n");
_dbus_warn_check_failed ("dbus_shutdown() called but connections were still live. This probably means the application did not drop all its references to bus connections.");
dbus_free (bus_connection_addresses[i]);
bus_connection_addresses[i] = NULL;
......@@ -168,9 +168,9 @@ init_session_address (void)
else if (supported && !retval)
{
if (dbus_error_is_set(&error))
_dbus_warn ("Dynamic session lookup supported but failed: %s\n", error.message);
_dbus_warn ("Dynamic session lookup supported but failed: %s", error.message);
else
_dbus_warn ("Dynamic session lookup supported but failed silently\n");
_dbus_warn ("Dynamic session lookup supported but failed silently");
}
_dbus_string_free (&addr);
}
......
......@@ -2833,8 +2833,8 @@ dbus_connection_unref (DBusConnection *connection)
{
_dbus_warn_check_failed ("The last reference on a connection was dropped without closing the connection. This is a bug in an application. See dbus_connection_unref() documentation for details.\n%s",
connection->shareable ?
"Most likely, the application called unref() too many times and removed a reference belonging to libdbus, since this is a shared connection.\n" :
"Most likely, the application was supposed to call dbus_connection_close(), since this is a private connection.\n");
"Most likely, the application called unref() too many times and removed a reference belonging to libdbus, since this is a shared connection." :
"Most likely, the application was supposed to call dbus_connection_close(), since this is a private connection.");
return;
}
#endif
......@@ -2941,7 +2941,7 @@ dbus_connection_close (DBusConnection *connection)
{
CONNECTION_UNLOCK (connection);
_dbus_warn_check_failed ("Applications must not close shared connections - see dbus_connection_close() docs. This is a bug in the application.\n");
_dbus_warn_check_failed ("Applications must not close shared connections - see dbus_connection_close() docs. This is a bug in the application.");
return;
}
#endif
......@@ -5654,7 +5654,7 @@ dbus_connection_remove_filter (DBusConnection *connection,
#ifndef DBUS_DISABLE_CHECKS
if (filter == NULL)
{
_dbus_warn_check_failed ("Attempt to remove filter function %p user data %p, but no such filter has been added\n",
_dbus_warn_check_failed ("Attempt to remove filter function %p user data %p, but no such filter has been added",
function, user_data);
return;
}
......@@ -5773,7 +5773,7 @@ dbus_connection_register_object_path (DBusConnection *connection,
if (dbus_error_has_name (&error, DBUS_ERROR_OBJECT_PATH_IN_USE))
{
_dbus_warn ("%s\n", error.message);
_dbus_warn ("%s", error.message);
dbus_error_free (&error);
return FALSE;
}
......@@ -5845,7 +5845,7 @@ dbus_connection_register_fallback (DBusConnection *connection,
if (dbus_error_has_name (&error, DBUS_ERROR_OBJECT_PATH_IN_USE))
{
_dbus_warn ("%s\n", error.message);
_dbus_warn ("%s", error.message);
dbus_error_free (&error);
return FALSE;
}
......
......@@ -250,7 +250,7 @@ _dbus_keyring_unlock (DBusKeyring *keyring)
if (!_dbus_delete_file (&keyring->filename_lock, &error))
{
_dbus_warn ("Failed to delete lock file: %s\n",
_dbus_warn ("Failed to delete lock file: %s",
error.message);
dbus_error_free (&error);
}
......@@ -452,7 +452,7 @@ _dbus_keyring_reload (DBusKeyring *keyring,
if (!_dbus_string_validate_ascii (&contents, 0,
_dbus_string_get_length (&contents)))
{
_dbus_warn ("Secret keyring file contains non-ASCII! Ignoring existing contents\n");
_dbus_warn ("Secret keyring file contains non-ASCII! Ignoring existing contents");
_dbus_string_set_length (&contents, 0);
}
......@@ -621,7 +621,7 @@ _dbus_keyring_reload (DBusKeyring *keyring,
{
if (error && error->name)
_dbus_verbose ("error is %s: %s\n", error->name, error->message);
_dbus_warn ("returning %d but error pointer %p name %s\n",
_dbus_warn ("returning %d but error pointer %p name %s",
retval, error, error->name ? error->name : "(none)");
_dbus_assert_not_reached ("didn't handle errors properly");
}
......
......@@ -199,7 +199,7 @@ cull_watches_for_invalid_fd (DBusLoop *loop,
DBusList *link;
DBusList **watches;
_dbus_warn ("invalid request, socket fd %" DBUS_POLLABLE_FORMAT " not open\n",
_dbus_warn ("invalid request, socket fd %" DBUS_POLLABLE_FORMAT " not open",
_dbus_pollable_printable (fd));
watches = _dbus_hash_table_lookup_pollable (loop->watches, fd);
......@@ -363,7 +363,7 @@ _dbus_loop_remove_watch (DBusLoop *loop,
}
}
_dbus_warn ("could not find watch %p to remove\n", watch);
_dbus_warn ("could not find watch %p to remove", watch);
}
dbus_bool_t
......@@ -415,7 +415,7 @@ _dbus_loop_remove_timeout (DBusLoop *loop,
link = next;
}
_dbus_warn ("could not find timeout %p to remove\n", timeout);
_dbus_warn ("could not find timeout %p to remove", timeout);
}
/* Convolutions from GLib, there really must be a better way
......
......@@ -583,7 +583,7 @@ _dbus_marshal_read_basic (const DBusString *str,
}
break;
default:
_dbus_warn_check_failed ("type %s %d not a basic type\n",
_dbus_warn_check_failed ("type %s %d not a basic type",
_dbus_type_to_string (type), type);
_dbus_assert_not_reached ("not a basic type");
break;
......@@ -698,7 +698,7 @@ marshal_len_followed_by_bytes (int marshal_as,
_dbus_assert (byte_order == DBUS_LITTLE_ENDIAN || byte_order == DBUS_BIG_ENDIAN);
if (insert_at > _dbus_string_get_length (str))
_dbus_warn ("insert_at = %d string len = %d data_len = %d\n",
_dbus_warn ("insert_at = %d string len = %d data_len = %d",
insert_at, _dbus_string_get_length (str), data_len);
if (marshal_as == MARSHAL_AS_BYTE_ARRAY)
......@@ -1129,7 +1129,7 @@ _dbus_marshal_skip_basic (const DBusString *str,
}
break;
default:
_dbus_warn ("type %s not a basic type\n",
_dbus_warn ("type %s not a basic type",
_dbus_type_to_string (type));
_dbus_assert_not_reached ("not a basic type");
break;
......@@ -1548,7 +1548,7 @@ swap_test_array (void *array,
{ \
_dbus_verbose_bytes_of_string (&str, dump_pos, \
_dbus_string_get_length (&str) - dump_pos); \
_dbus_warn ("literal '%s'\nvalue '%s'\n", literal, v_##typename); \
_dbus_warn ("literal '%s'\nvalue '%s'", literal, v_##typename); \
_dbus_assert_not_reached ("demarshaled wrong value"); \
} \
} while (0)
......
......@@ -75,7 +75,7 @@ do_byteswap_test (int byte_order)
_dbus_verbose_bytes_of_string (&copy, 0,
_dbus_string_get_length (&copy));
_dbus_warn ("Byte-swapped data did not have same values as original data\n");
_dbus_warn ("Byte-swapped data did not have same values as original data");
_dbus_assert_not_reached ("test failed");
}
......
......@@ -304,7 +304,7 @@ real_check_expected_type (DBusTypeReader *reader,
if (t != expected)
{