Remove trailing newlines from _dbus_warn, _dbus_warn_check_failed
authorSimon McVittie <smcv@debian.org>
Thu, 21 Jul 2016 10:01:01 +0000 (11:01 +0100)
committerSimon McVittie <smcv@debian.org>
Fri, 30 Sep 2016 18:36:51 +0000 (19:36 +0100)
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: Simon McVittie <smcv@debian.org>
42 files changed:
bus/config-parser-trivial.c
bus/config-parser.c
bus/dir-watch-inotify.c
bus/dir-watch-kqueue.c
bus/dispatch.c
bus/main.c
bus/selinux.c
bus/signals.c
bus/test-launch-helper.c
bus/test-main.c
bus/test-system.c
bus/test.c
dbus/dbus-address.c
dbus/dbus-auth-script.c
dbus/dbus-auth-util.c
dbus/dbus-bus.c
dbus/dbus-connection.c
dbus/dbus-keyring.c
dbus/dbus-mainloop.c
dbus/dbus-marshal-basic.c
dbus/dbus-marshal-byteswap-util.c
dbus/dbus-marshal-recursive-util.c
dbus/dbus-marshal-recursive.c
dbus/dbus-marshal-validate-util.c
dbus/dbus-memory.c
dbus/dbus-message-util.c
dbus/dbus-message.c
dbus/dbus-object-tree.c
dbus/dbus-server.c
dbus/dbus-sha.c
dbus/dbus-socket-set-epoll.c
dbus/dbus-spawn-test.c
dbus/dbus-spawn.c
dbus/dbus-sysdeps-pthread.c
dbus/dbus-sysdeps-unix.c
dbus/dbus-sysdeps-util-unix.c
dbus/dbus-sysdeps-util.c
dbus/dbus-sysdeps-win.c
dbus/dbus-test.c
dbus/dbus-transport.c
dbus/dbus-userdb.c
dbus/dbus-watch.c

index 0ba5f36..129431d 100644 (file)
@@ -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);
index 2bedc70..c2f446e 100644 (file)
@@ -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);
index a287f0b..447dc2d 100644 (file)
@@ -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;
         }
 
index c1e8324..9b1784e 100644 (file)
@@ -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;
             }
index 9a6eaaf..64524ba 100644 (file)
@@ -644,7 +644,7 @@ warn_unexpected_real (DBusConnection *connection,
                       int             line)
 {
   if (message)
-    _dbus_warn ("%s:%d received message interface \"%s\" member \"%s\" error name \"%s\" on %p, expecting %s\n",
+    _dbus_warn ("%s:%d received message interface \"%s\" member \"%s\" error name \"%s\" on %p, expecting %s",
                 function, line,
                 dbus_message_get_interface (message) ?
                 dbus_message_get_interface (message) : "(unset)",
@@ -655,7 +655,7 @@ warn_unexpected_real (DBusConnection *connection,
                 connection,
                 expected);
   else
-    _dbus_warn ("%s:%d received no message on %p, expecting %s\n",
+    _dbus_warn ("%s:%d received no message on %p, expecting %s",
                 function, line, connection, expected);
 }
 
@@ -715,7 +715,7 @@ check_service_owner_changed_foreach (DBusConnection *connection,
       message = pop_message_waiting_for_memory (connection);
       if (message == NULL)
         {
-          _dbus_warn ("Did not receive a message on %p, expecting %s\n",
+          _dbus_warn ("Did not receive a message on %p, expecting %s",
                       connection, "NameOwnerChanged");
           goto out;
         }
@@ -751,7 +751,7 @@ check_service_owner_changed_foreach (DBusConnection *connection,
             }
           else
             {
-              _dbus_warn ("Did not get the expected arguments\n");
+              _dbus_warn ("Did not get the expected arguments");
               goto out;
             }
         }
@@ -760,13 +760,13 @@ check_service_owner_changed_foreach (DBusConnection *connection,
           || (d->expected_kind == OWNER_CHANGED   && (!old_owner[0] || !new_owner[0]))
           || (d->expected_kind == SERVICE_DELETED && (!old_owner[0] ||  new_owner[0])))
         {
-          _dbus_warn ("inconsistent NameOwnerChanged arguments\n");
+          _dbus_warn ("inconsistent NameOwnerChanged arguments");
           goto out;
         }
 
       if (strcmp (service_name, d->expected_service_name) != 0)
         {
-          _dbus_warn ("expected info on service %s, got info on %s\n",
+          _dbus_warn ("expected info on service %s, got info on %s",
                       d->expected_service_name,
                       service_name);
           goto out;
@@ -775,7 +775,7 @@ check_service_owner_changed_foreach (DBusConnection *connection,
       if (*service_name == ':' && new_owner[0]
           && strcmp (service_name, new_owner) != 0)
         {
-          _dbus_warn ("inconsistent ServiceOwnedChanged message (\"%s\" [ %s -> %s ])\n",
+          _dbus_warn ("inconsistent ServiceOwnedChanged message (\"%s\" [ %s -> %s ])",
                       service_name, old_owner, new_owner);
           goto out;
         }
@@ -987,7 +987,7 @@ check_hello_message (BusContext     *context,
   message = pop_message_waiting_for_memory (connection);
   if (message == NULL)
     {
-      _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+      _dbus_warn ("Did not receive a reply to %s %d on %p",
                   "Hello", serial, connection);
       goto out;
     }
@@ -996,7 +996,7 @@ check_hello_message (BusContext     *context,
 
   if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
     {
-      _dbus_warn ("Message has wrong sender %s\n",
+      _dbus_warn ("Message has wrong sender %s",
                   dbus_message_get_sender (message) ?
                   dbus_message_get_sender (message) : "(none)");
       goto out;
@@ -1046,7 +1046,7 @@ check_hello_message (BusContext     *context,
           else
             {
               _dbus_assert (dbus_error_is_set (&error));
-              _dbus_warn ("Did not get the expected single string argument to hello\n");
+              _dbus_warn ("Did not get the expected single string argument to hello");
               goto out;
             }
         }
@@ -1078,7 +1078,7 @@ check_hello_message (BusContext     *context,
           message = pop_message_waiting_for_memory (connection);
           if (message == NULL)
             {
-              _dbus_warn ("Expecting %s, got nothing\n",
+              _dbus_warn ("Expecting %s, got nothing",
                       "NameAcquired");
               goto out;
             }
@@ -1086,7 +1086,7 @@ check_hello_message (BusContext     *context,
       if (! dbus_message_is_signal (message, DBUS_INTERFACE_DBUS,
                                     "NameAcquired"))
         {
-          _dbus_warn ("Expecting %s, got smthg else\n",
+          _dbus_warn ("Expecting %s, got smthg else",
                       "NameAcquired");
           goto out;
         }
@@ -1106,7 +1106,7 @@ check_hello_message (BusContext     *context,
           else
             {
               _dbus_assert (dbus_error_is_set (&error));
-              _dbus_warn ("Did not get the expected single string argument to ServiceAcquired\n");
+              _dbus_warn ("Did not get the expected single string argument to ServiceAcquired");
               goto out;
             }
         }
@@ -1115,7 +1115,7 @@ check_hello_message (BusContext     *context,
 
       if (strcmp (acquired, name) != 0)
         {
-          _dbus_warn ("Acquired name is %s but expected %s\n",
+          _dbus_warn ("Acquired name is %s but expected %s",
                       acquired, name);
           goto out;
         }
@@ -1198,7 +1198,7 @@ check_double_hello_message (BusContext     *context,
   message = pop_message_waiting_for_memory (connection);
   if (message == NULL)
     {
-      _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+      _dbus_warn ("Did not receive a reply to %s %d on %p",
                   "Hello", serial, connection);
       goto out;
     }
@@ -1207,7 +1207,7 @@ check_double_hello_message (BusContext     *context,
 
   if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
     {
-      _dbus_warn ("Message has wrong sender %s\n",
+      _dbus_warn ("Message has wrong sender %s",
                   dbus_message_get_sender (message) ?
                   dbus_message_get_sender (message) : "(none)");
       goto out;
@@ -1300,7 +1300,7 @@ check_get_connection_unix_user (BusContext     *context,
   message = pop_message_waiting_for_memory (connection);
   if (message == NULL)
     {
-      _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+      _dbus_warn ("Did not receive a reply to %s %d on %p",
                   "GetConnectionUnixUser", serial, connection);
       goto out;
     }
@@ -1356,7 +1356,7 @@ check_get_connection_unix_user (BusContext     *context,
           else
             {
               _dbus_assert (dbus_error_is_set (&error));
-              _dbus_warn ("Did not get the expected DBUS_TYPE_UINT32 from GetConnectionUnixUser\n");
+              _dbus_warn ("Did not get the expected DBUS_TYPE_UINT32 from GetConnectionUnixUser");
               goto out;
             }
         }
@@ -1445,7 +1445,7 @@ check_get_connection_unix_process_id (BusContext     *context,
   message = pop_message_waiting_for_memory (connection);
   if (message == NULL)
     {
-      _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+      _dbus_warn ("Did not receive a reply to %s %d on %p",
                   "GetConnectionUnixProcessID", serial, connection);
       goto out;
     }
@@ -1519,7 +1519,7 @@ check_get_connection_unix_process_id (BusContext     *context,
           else
             {
               _dbus_assert (dbus_error_is_set (&error));
-              _dbus_warn ("Did not get the expected DBUS_TYPE_UINT32 from GetConnectionUnixProcessID\n");
+              _dbus_warn ("Did not get the expected DBUS_TYPE_UINT32 from GetConnectionUnixProcessID");
               goto out;
             }
         }
@@ -1535,7 +1535,7 @@ check_get_connection_unix_process_id (BusContext     *context,
           if (pid != (dbus_uint32_t) _dbus_getpid ())
             {
               _dbus_assert (dbus_error_is_set (&error));
-              _dbus_warn ("Result from GetConnectionUnixProcessID is not our own pid\n");
+              _dbus_warn ("Result from GetConnectionUnixProcessID is not our own pid");
               goto out;
             }
         }
@@ -1630,7 +1630,7 @@ check_add_match (BusContext     *context,
   message = pop_message_waiting_for_memory (connection);
   if (message == NULL)
     {
-      _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+      _dbus_warn ("Did not receive a reply to %s %d on %p",
                   "AddMatch", serial, connection);
       goto out;
     }
@@ -1639,7 +1639,7 @@ check_add_match (BusContext     *context,
 
   if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
     {
-      _dbus_warn ("Message has wrong sender %s\n",
+      _dbus_warn ("Message has wrong sender %s",
                   dbus_message_get_sender (message) ?
                   dbus_message_get_sender (message) : "(none)");
       goto out;
@@ -1755,7 +1755,7 @@ check_get_all_match_rules (BusContext     *context,
   message = pop_message_waiting_for_memory (connection);
   if (message == NULL)
     {
-      _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+      _dbus_warn ("Did not receive a reply to %s %d on %p",
                   "AddMatch", serial, connection);
       goto out;
     }
@@ -1764,7 +1764,7 @@ check_get_all_match_rules (BusContext     *context,
 
   if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
     {
-      _dbus_warn ("Message has wrong sender %s\n",
+      _dbus_warn ("Message has wrong sender %s",
                   dbus_message_get_sender (message) ?
                   dbus_message_get_sender (message) : "(none)");
       goto out;
@@ -1922,7 +1922,7 @@ check_nonexistent_service_no_auto_start (BusContext     *context,
   message = pop_message_waiting_for_memory (connection);
   if (message == NULL)
     {
-      _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+      _dbus_warn ("Did not receive a reply to %s %d on %p",
                   "StartServiceByName", serial, connection);
       goto out;
     }
@@ -1933,7 +1933,7 @@ check_nonexistent_service_no_auto_start (BusContext     *context,
     {
       if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
         {
-          _dbus_warn ("Message has wrong sender %s\n",
+          _dbus_warn ("Message has wrong sender %s",
                       dbus_message_get_sender (message) ?
                       dbus_message_get_sender (message) : "(none)");
           goto out;
@@ -1957,7 +1957,7 @@ check_nonexistent_service_no_auto_start (BusContext     *context,
     }
   else
     {
-      _dbus_warn ("Did not expect to successfully activate %s\n",
+      _dbus_warn ("Did not expect to successfully activate %s",
                   NONEXISTENT_SERVICE_NAME);
       goto out;
     }
@@ -2015,7 +2015,7 @@ check_nonexistent_service_auto_start (BusContext     *context,
 
   if (message == NULL)
     {
-      _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+      _dbus_warn ("Did not receive a reply to %s %d on %p",
                   "Echo message (auto activation)", serial, connection);
       goto out;
     }
@@ -2026,7 +2026,7 @@ check_nonexistent_service_auto_start (BusContext     *context,
     {
       if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
         {
-          _dbus_warn ("Message has wrong sender %s\n",
+          _dbus_warn ("Message has wrong sender %s",
                       dbus_message_get_sender (message) ?
                       dbus_message_get_sender (message) : "(none)");
           goto out;
@@ -2050,7 +2050,7 @@ check_nonexistent_service_auto_start (BusContext     *context,
     }
   else
     {
-      _dbus_warn ("Did not expect to successfully activate %s\n",
+      _dbus_warn ("Did not expect to successfully activate %s",
                   NONEXISTENT_SERVICE_NAME);
       goto out;
     }
@@ -2110,7 +2110,7 @@ check_base_service_activated (BusContext     *context,
             }
           else
             {
-              _dbus_warn ("Message %s doesn't have a service name: %s\n",
+              _dbus_warn ("Message %s doesn't have a service name: %s",
                           "NameOwnerChanged (creation)",
                           error.message);
               goto out;
@@ -2119,21 +2119,21 @@ check_base_service_activated (BusContext     *context,
 
       if (*base_service != ':')
         {
-          _dbus_warn ("Expected base service activation, got \"%s\" instead\n",
+          _dbus_warn ("Expected base service activation, got \"%s\" instead",
                       base_service);
           goto out;
         }
 
       if (strcmp (base_service, base_service_from_bus) != 0)
         {
-          _dbus_warn ("Expected base service activation, got \"%s\" instead with owner \"%s\"\n",
+          _dbus_warn ("Expected base service activation, got \"%s\" instead with owner \"%s\"",
                       base_service, base_service_from_bus);
           goto out;
         }
 
       if (old_owner[0])
         {
-          _dbus_warn ("Received an old_owner argument during base service activation, \"%s\"\n",
+          _dbus_warn ("Received an old_owner argument during base service activation, \"%s\"",
                       old_owner);
           goto out;
         }
@@ -2215,7 +2215,7 @@ check_service_activated (BusContext     *context,
             }
           else
             {
-              _dbus_warn ("Message %s doesn't have a service name: %s\n",
+              _dbus_warn ("Message %s doesn't have a service name: %s",
                           "NameOwnerChanged (creation)",
                           error.message);
               goto out;
@@ -2224,21 +2224,21 @@ check_service_activated (BusContext     *context,
 
       if (strcmp (service_name, activated_name) != 0)
         {
-          _dbus_warn ("Expected to see service %s created, saw %s instead\n",
+          _dbus_warn ("Expected to see service %s created, saw %s instead",
                       activated_name, service_name);
           goto out;
         }
 
       if (strcmp (base_service_name, base_service_from_bus) != 0)
         {
-          _dbus_warn ("NameOwnerChanged reports wrong base service: %s owner, expected %s instead\n",
+          _dbus_warn ("NameOwnerChanged reports wrong base service: %s owner, expected %s instead",
                       base_service_from_bus, base_service_name);
           goto out;
         }
 
       if (old_owner[0])
         {
-          _dbus_warn ("expected a %s, got a %s\n",
+          _dbus_warn ("expected a %s, got a %s",
                       "NameOwnerChanged (creation)",
                       "NameOwnerChanged (change)");
           goto out;
@@ -2264,7 +2264,7 @@ check_service_activated (BusContext     *context,
       message = pop_message_waiting_for_memory (connection);
       if (message == NULL)
         {
-          _dbus_warn ("Expected a reply to %s, got nothing\n",
+          _dbus_warn ("Expected a reply to %s, got nothing",
                       "StartServiceByName");
           goto out;
         }
@@ -2290,7 +2290,7 @@ check_service_activated (BusContext     *context,
     {
       if (!dbus_error_has_name (&error, DBUS_ERROR_NO_MEMORY))
         {
-          _dbus_warn ("Did not have activation result first argument to %s: %s\n",
+          _dbus_warn ("Did not have activation result first argument to %s: %s",
                       "StartServiceByName", error.message);
           goto out;
         }
@@ -2305,7 +2305,7 @@ check_service_activated (BusContext     *context,
         ; /* Good also */
       else
         {
-          _dbus_warn ("Activation result was %u, no good.\n",
+          _dbus_warn ("Activation result was %u, no good.",
                       activation_result);
           goto out;
         }
@@ -2316,7 +2316,7 @@ check_service_activated (BusContext     *context,
 
   if (!check_no_leftovers (context))
     {
-      _dbus_warn ("Messages were left over after verifying existent activation results\n");
+      _dbus_warn ("Messages were left over after verifying existent activation results");
       goto out;
     }
 
@@ -2368,7 +2368,7 @@ check_service_auto_activated (BusContext     *context,
             }
           else
             {
-              _dbus_warn ("Message %s doesn't have a service name: %s\n",
+              _dbus_warn ("Message %s doesn't have a service name: %s",
                           "NameOwnerChanged",
                           error.message);
               dbus_error_free (&error);
@@ -2378,7 +2378,7 @@ check_service_auto_activated (BusContext     *context,
 
       if (strcmp (service_name, activated_name) != 0)
         {
-          _dbus_warn ("Expected to see service %s created, saw %s instead\n",
+          _dbus_warn ("Expected to see service %s created, saw %s instead",
                       activated_name, service_name);
           goto out;
         }
@@ -2600,7 +2600,7 @@ check_send_exit_to_service (BusContext     *context,
 
       if (!check_no_leftovers (context))
         {
-          _dbus_warn ("Messages were left over after %s\n",
+          _dbus_warn ("Messages were left over after %s",
                       _DBUS_FUNCTION_NAME);
           goto out;
         }
@@ -2632,7 +2632,7 @@ check_got_error (BusContext     *context,
   message = pop_message_waiting_for_memory (connection);
   if (message == NULL)
     {
-      _dbus_warn ("Did not get an expected error\n");
+      _dbus_warn ("Did not get an expected error");
       goto out;
     }
 
@@ -2660,7 +2660,7 @@ check_got_error (BusContext     *context,
 
   if (!error_found)
     {
-      _dbus_warn ("Expected error %s or other, got %s instead\n",
+      _dbus_warn ("Expected error %s or other, got %s instead",
                   first_error_name,
                   dbus_message_get_error_name (message));
       goto out;
@@ -2715,7 +2715,7 @@ check_got_service_info (DBusMessage *message)
             }
           else
             {
-              _dbus_warn ("unexpected arguments for NameOwnerChanged message\n");
+              _dbus_warn ("unexpected arguments for NameOwnerChanged message");
               message_kind = GOT_SOMETHING_ELSE;
             }
         }
@@ -2804,7 +2804,7 @@ check_existent_service_no_auto_start (BusContext     *context,
   message = pop_message_waiting_for_memory (connection);
   if (message == NULL)
     {
-      _dbus_warn ("Did not receive any messages after %s %d on %p\n",
+      _dbus_warn ("Did not receive any messages after %s %d on %p",
                   "StartServiceByName", serial, connection);
       goto out;
     }
@@ -2816,7 +2816,7 @@ check_existent_service_no_auto_start (BusContext     *context,
     {
       if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
         {
-          _dbus_warn ("Message has wrong sender %s\n",
+          _dbus_warn ("Message has wrong sender %s",
                       dbus_message_get_sender (message) ?
                       dbus_message_get_sender (message) : "(none)");
           goto out;
@@ -2838,7 +2838,7 @@ check_existent_service_no_auto_start (BusContext     *context,
         }
       else
         {
-          _dbus_warn ("Did not expect error %s\n",
+          _dbus_warn ("Did not expect error %s",
                       dbus_message_get_error_name (message));
           goto out;
         }
@@ -2860,7 +2860,7 @@ check_existent_service_no_auto_start (BusContext     *context,
       message = dbus_connection_borrow_message (connection);
       if (message == NULL)
         {
-          _dbus_warn ("Did not receive any messages after base service creation notification\n");
+          _dbus_warn ("Did not receive any messages after base service creation notification");
           goto out;
         }
 
@@ -2931,7 +2931,7 @@ check_existent_service_no_auto_start (BusContext     *context,
           if (message == NULL)
             {
               _dbus_warn ("Failed to pop message we just put back! "
-                          "should have been a NameOwnerChanged (creation)\n");
+                          "should have been a NameOwnerChanged (creation)");
               goto out;
             }
 
@@ -2944,7 +2944,7 @@ check_existent_service_no_auto_start (BusContext     *context,
 
           if (!check_no_leftovers (context))
             {
-              _dbus_warn ("Messages were left over after successful activation\n");
+              _dbus_warn ("Messages were left over after successful activation");
               goto out;
             }
 
@@ -3026,7 +3026,7 @@ check_segfault_service_no_auto_start (BusContext     *context,
   message = pop_message_waiting_for_memory (connection);
   if (message == NULL)
     {
-      _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+      _dbus_warn ("Did not receive a reply to %s %d on %p",
                   "StartServiceByName", serial, connection);
       goto out;
     }
@@ -3037,7 +3037,7 @@ check_segfault_service_no_auto_start (BusContext     *context,
     {
       if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
         {
-          _dbus_warn ("Message has wrong sender %s\n",
+          _dbus_warn ("Message has wrong sender %s",
                       dbus_message_get_sender (message) ?
                       dbus_message_get_sender (message) : "(none)");
           goto out;
@@ -3078,7 +3078,7 @@ check_segfault_service_no_auto_start (BusContext     *context,
     }
   else
     {
-      _dbus_warn ("Did not expect to successfully activate segfault service\n");
+      _dbus_warn ("Did not expect to successfully activate segfault service");
       goto out;
     }
 
@@ -3135,7 +3135,7 @@ check_segfault_service_auto_start (BusContext     *context,
   message = pop_message_waiting_for_memory (connection);
   if (message == NULL)
     {
-      _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+      _dbus_warn ("Did not receive a reply to %s %d on %p",
                   "Echo message (auto activation)", serial, connection);
       goto out;
     }
@@ -3146,7 +3146,7 @@ check_segfault_service_auto_start (BusContext     *context,
     {
       if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
         {
-          _dbus_warn ("Message has wrong sender %s\n",
+          _dbus_warn ("Message has wrong sender %s",
                       dbus_message_get_sender (message) ?
                       dbus_message_get_sender (message) : "(none)");
           goto out;
@@ -3179,7 +3179,7 @@ check_segfault_service_auto_start (BusContext     *context,
     }
   else
     {
-      _dbus_warn ("Did not expect to successfully activate segfault service\n");
+      _dbus_warn ("Did not expect to successfully activate segfault service");
       goto out;
     }
 
@@ -3242,13 +3242,13 @@ check_existent_hello_from_self (BusContext     *context,
   message = pop_message_waiting_for_memory (connection);
   if (message == NULL)
     {
-      _dbus_warn ("Failed to pop message! Should have been reply from RunHelloFromSelf message\n");
+      _dbus_warn ("Failed to pop message! Should have been reply from RunHelloFromSelf message");
       return FALSE;
     }
 
   if (dbus_message_get_reply_serial (message) != serial)
     {
-      _dbus_warn ("Wrong reply serial\n");
+      _dbus_warn ("Wrong reply serial");
       dbus_message_unref (message);
       return FALSE;
     }
@@ -3295,20 +3295,20 @@ check_existent_ping (BusContext     *context,
   message = pop_message_waiting_for_memory (connection);
   if (message == NULL)
     {
-      _dbus_warn ("Failed to pop message! Should have been reply from Ping message\n");
+      _dbus_warn ("Failed to pop message! Should have been reply from Ping message");
       return FALSE;
     }
 
   if (dbus_message_get_reply_serial (message) != serial)
     {
-      _dbus_warn ("Wrong reply serial\n");
+      _dbus_warn ("Wrong reply serial");
       dbus_message_unref (message);
       return FALSE;
     }
 
   if (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_METHOD_RETURN)
     {
-      _dbus_warn ("Unexpected message return during Ping\n");
+      _dbus_warn ("Unexpected message return during Ping");
       dbus_message_unref (message);
       return FALSE;
     }
@@ -3357,20 +3357,20 @@ check_existent_get_machine_id (BusContext     *context,
   message = pop_message_waiting_for_memory (connection);
   if (message == NULL)
     {
-      _dbus_warn ("Failed to pop message! Should have been reply from GetMachineId message\n");
+      _dbus_warn ("Failed to pop message! Should have been reply from GetMachineId message");
       return FALSE;
     }
 
   if (dbus_message_get_reply_serial (message) != serial)
     {
-      _dbus_warn ("Wrong reply serial\n");
+      _dbus_warn ("Wrong reply serial");
       dbus_message_unref (message);
       return FALSE;
     }
 
   if (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_METHOD_RETURN)
     {
-      _dbus_warn ("Unexpected message return during GetMachineId\n");
+      _dbus_warn ("Unexpected message return during GetMachineId");
       dbus_message_unref (message);
       return FALSE;
     }
@@ -3378,14 +3378,14 @@ check_existent_get_machine_id (BusContext     *context,
   machine_id = NULL;
   if (!dbus_message_get_args (message, NULL, DBUS_TYPE_STRING, &machine_id, DBUS_TYPE_INVALID))
     {
-      _dbus_warn ("Did not get a machine ID in reply to GetMachineId\n");
+      _dbus_warn ("Did not get a machine ID in reply to GetMachineId");
       dbus_message_unref (message);
       return FALSE;
     }
 
   if (machine_id == NULL || strlen (machine_id) != 32)
     {
-      _dbus_warn ("Machine id looks bogus: '%s'\n", machine_id ? machine_id : "null");
+      _dbus_warn ("Machine id looks bogus: '%s'", machine_id ? machine_id : "null");
       dbus_message_unref (message);
       return FALSE;
     }
@@ -3461,7 +3461,7 @@ check_existent_service_auto_start (BusContext     *context,
   message = pop_message_waiting_for_memory (connection);
   if (message == NULL)
     {
-      _dbus_warn ("Did not receive any messages after auto start %d on %p\n",
+      _dbus_warn ("Did not receive any messages after auto start %d on %p",
                   serial, connection);
       goto out;
     }
@@ -3491,7 +3491,7 @@ check_existent_service_auto_start (BusContext     *context,
       if (message == NULL)
         {
           _dbus_warn ("No message after auto activation "
-                      "(should be a service announcement)\n");
+                      "(should be a service announcement)");
           dbus_connection_return_message (connection, message);
           message = NULL;
           goto out;
@@ -3509,7 +3509,7 @@ check_existent_service_auto_start (BusContext     *context,
           if (message == NULL)
             {
               _dbus_warn ("Failed to pop message we just put back! "
-                          "should have been a NameOwnerChanged (creation)\n");
+                          "should have been a NameOwnerChanged (creation)");
               goto out;
             }
 
@@ -3547,7 +3547,7 @@ check_existent_service_auto_start (BusContext     *context,
 
         case GOT_ERROR:
         case GOT_SOMETHING_ELSE:
-          _dbus_warn ("Unexpected message after auto activation\n");
+          _dbus_warn ("Unexpected message after auto activation");
           goto out;
         }
     }
@@ -3564,13 +3564,13 @@ check_existent_service_auto_start (BusContext     *context,
   message = pop_message_waiting_for_memory (connection);
   if (message == NULL)
     {
-      _dbus_warn ("Failed to pop message! Should have been reply from echo message\n");
+      _dbus_warn ("Failed to pop message! Should have been reply from echo message");
       goto out;
     }
 
   if (dbus_message_get_reply_serial (message) != serial)
     {
-      _dbus_warn ("Wrong reply serial\n");
+      _dbus_warn ("Wrong reply serial");
       goto out;
     }
 
@@ -3648,7 +3648,7 @@ check_launch_service_file_missing (BusContext     *context,
   message = pop_message_waiting_for_memory (connection);
   if (message == NULL)
     {
-      _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+      _dbus_warn ("Did not receive a reply to %s %d on %p",
                   "Echo message (auto activation)", serial, connection);
       goto out;
     }
@@ -3659,7 +3659,7 @@ check_launch_service_file_missing (BusContext     *context,
     {
       if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
         {
-          _dbus_warn ("Message has wrong sender %s\n",
+          _dbus_warn ("Message has wrong sender %s",
                       dbus_message_get_sender (message) ?
                       dbus_message_get_sender (message) : "(none)");
           goto out;
@@ -3685,7 +3685,7 @@ check_launch_service_file_missing (BusContext     *context,
     }
   else
     {
-      _dbus_warn ("Did not expect to successfully auto-start missing service\n");
+      _dbus_warn ("Did not expect to successfully auto-start missing service");
       goto out;
     }
 
@@ -3735,7 +3735,7 @@ check_launch_service_user_missing (BusContext     *context,
 
   if (!dbus_connection_get_is_connected (connection))
     {
-      _dbus_warn ("connection was disconnected\n");
+      _dbus_warn ("connection was disconnected");
       return TRUE;
     }
 
@@ -3744,7 +3744,7 @@ check_launch_service_user_missing (BusContext     *context,
   message = pop_message_waiting_for_memory (connection);
   if (message == NULL)
     {
-      _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+      _dbus_warn ("Did not receive a reply to %s %d on %p",
                   "Echo message (auto activation)", serial, connection);
       goto out;
     }
@@ -3755,7 +3755,7 @@ check_launch_service_user_missing (BusContext     *context,
     {
       if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
         {
-          _dbus_warn ("Message has wrong sender %s\n",
+          _dbus_warn ("Message has wrong sender %s",
                       dbus_message_get_sender (message) ?
                       dbus_message_get_sender (message) : "(none)");
           goto out;
@@ -3781,7 +3781,7 @@ check_launch_service_user_missing (BusContext     *context,
     }
   else
     {
-      _dbus_warn ("Did not expect to successfully auto-start missing service\n");
+      _dbus_warn ("Did not expect to successfully auto-start missing service");
       goto out;
     }
 
@@ -3831,7 +3831,7 @@ check_launch_service_exec_missing (BusContext     *context,
 
   if (!dbus_connection_get_is_connected (connection))
     {
-      _dbus_warn ("connection was disconnected\n");
+      _dbus_warn ("connection was disconnected");
       return TRUE;
     }
 
@@ -3840,7 +3840,7 @@ check_launch_service_exec_missing (BusContext     *context,
   message = pop_message_waiting_for_memory (connection);
   if (message == NULL)
     {
-      _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+      _dbus_warn ("Did not receive a reply to %s %d on %p",
                   "Echo message (auto activation)", serial, connection);
       goto out;
     }
@@ -3851,7 +3851,7 @@ check_launch_service_exec_missing (BusContext     *context,
     {
       if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
         {
-          _dbus_warn ("Message has wrong sender %s\n",
+          _dbus_warn ("Message has wrong sender %s",
                       dbus_message_get_sender (message) ?
                       dbus_message_get_sender (message) : "(none)");
           goto out;
@@ -3885,7 +3885,7 @@ check_launch_service_exec_missing (BusContext     *context,
     }
   else
     {
-      _dbus_warn ("Did not expect to successfully auto-start missing service\n");
+      _dbus_warn ("Did not expect to successfully auto-start missing service");
       goto out;
     }
 
@@ -3935,7 +3935,7 @@ check_launch_service_service_missing (BusContext     *context,
 
   if (!dbus_connection_get_is_connected (connection))
     {
-      _dbus_warn ("connection was disconnected\n");
+      _dbus_warn ("connection was disconnected");
       return TRUE;
     }
 
@@ -3944,7 +3944,7 @@ check_launch_service_service_missing (BusContext     *context,
   message = pop_message_waiting_for_memory (connection);
   if (message == NULL)
     {
-      _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+      _dbus_warn ("Did not receive a reply to %s %d on %p",
                   "Echo message (auto activation)", serial, connection);
       goto out;
     }
@@ -3955,7 +3955,7 @@ check_launch_service_service_missing (BusContext     *context,
     {
       if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
         {
-          _dbus_warn ("Message has wrong sender %s\n",
+          _dbus_warn ("Message has wrong sender %s",
                       dbus_message_get_sender (message) ?
                       dbus_message_get_sender (message) : "(none)");
           goto out;
@@ -3989,7 +3989,7 @@ check_launch_service_service_missing (BusContext     *context,
     }
   else
     {
-      _dbus_warn ("Did not expect to successfully auto-start missing service\n");
+      _dbus_warn ("Did not expect to successfully auto-start missing service");
       goto out;
     }
 
@@ -4047,7 +4047,7 @@ check_shell_fail_service_auto_start (BusContext     *context,
   message = pop_message_waiting_for_memory (connection);
   if (message == NULL)
     {
-      _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+      _dbus_warn ("Did not receive a reply to %s %d on %p",
                   "Echo message (auto activation)", serial, connection);
       goto out;
     }
@@ -4058,7 +4058,7 @@ check_shell_fail_service_auto_start (BusContext     *context,
     {
       if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
         {
-          _dbus_warn ("Message has wrong sender %s\n",
+          _dbus_warn ("Message has wrong sender %s",
                       dbus_message_get_sender (message) ?
                       dbus_message_get_sender (message) : "(none)");
           goto out;
@@ -4084,7 +4084,7 @@ check_shell_fail_service_auto_start (BusContext     *context,
     }
   else
     {
-      _dbus_warn ("Did not expect to successfully auto-start shell fail service\n");
+      _dbus_warn ("Did not expect to successfully auto-start shell fail service");
       goto out;
     }
 
@@ -4151,7 +4151,7 @@ check_shell_service_success_auto_start (BusContext     *context,
   message = pop_message_waiting_for_memory (connection);
   if (message == NULL)
     {
-      _dbus_warn ("Did not receive any messages after auto start %d on %p\n",
+      _dbus_warn ("Did not receive any messages after auto start %d on %p",
                   serial, connection);
       goto out;
     }
@@ -4181,7 +4181,7 @@ check_shell_service_success_auto_start (BusContext     *context,
       if (message == NULL)
         {
           _dbus_warn ("No message after auto activation "
-                      "(should be a service announcement)\n");
+                      "(should be a service announcement)");
           dbus_connection_return_message (connection, message);
           message = NULL;
           goto out;
@@ -4199,7 +4199,7 @@ check_shell_service_success_auto_start (BusContext     *context,
           if (message == NULL)
             {
               _dbus_warn ("Failed to pop message we just put back! "
-                          "should have been a NameOwnerChanged (creation)\n");
+                          "should have been a NameOwnerChanged (creation)");
               goto out;
             }
 
@@ -4237,7 +4237,7 @@ check_shell_service_success_auto_start (BusContext     *context,
 
         case GOT_ERROR:
         case GOT_SOMETHING_ELSE:
-          _dbus_warn ("Unexpected message after auto activation\n");
+          _dbus_warn ("Unexpected message after auto activation");
           goto out;
         }
     }
@@ -4254,13 +4254,13 @@ check_shell_service_success_auto_start (BusContext     *context,
   message = pop_message_waiting_for_memory (connection);
   if (message == NULL)
     {
-      _dbus_warn ("Failed to pop message! Should have been reply from echo message\n");
+      _dbus_warn ("Failed to pop message! Should have been reply from echo message");
       goto out;
     }
 
   if (dbus_message_get_reply_serial (message) != serial)
     {
-      _dbus_warn ("Wrong reply serial\n");
+      _dbus_warn ("Wrong reply serial");
       goto out;
     }
 
@@ -4274,7 +4274,7 @@ check_shell_service_success_auto_start (BusContext     *context,
                                        DBUS_TYPE_STRING, &argv[6],
                                        DBUS_TYPE_INVALID))
     {
-      _dbus_warn ("Error getting arguments from return\n");
+      _dbus_warn ("Error getting arguments from return");
       goto out;
     }
 
@@ -4283,42 +4283,42 @@ check_shell_service_success_auto_start (BusContext     *context,
    */
   if (strcmp("-test", argv[1]) != 0)
     {
-      _dbus_warn ("Unexpected argv[1] in shell success service test (expected: %s, got: %s)\n",
+      _dbus_warn ("Unexpected argv[1] in shell success service test (expected: %s, got: %s)",
                   "-test", argv[1]);
       goto out;
     }
 
   if (strcmp("that", argv[2]) != 0)
     {
-      _dbus_warn ("Unexpected argv[2] in shell success service test (expected: %s, got: %s)\n",
+      _dbus_warn ("Unexpected argv[2] in shell success service test (expected: %s, got: %s)",
                    "that", argv[2]);
       goto out;
     }
 
   if (strcmp("we get", argv[3]) != 0)
     {
-      _dbus_warn ("Unexpected argv[3] in shell success service test (expected: %s, got: %s)\n",
+      _dbus_warn ("Unexpected argv[3] in shell success service test (expected: %s, got: %s)",
                    "we get", argv[3]);
       goto out;
     }
 
   if (strcmp("back", argv[4]) != 0)
     {
-      _dbus_warn ("Unexpected argv[4] in shell success service test (expected: %s, got: %s)\n",
+      _dbus_warn ("Unexpected argv[4] in shell success service test (expected: %s, got: %s)",
                    "back", argv[4]);
       goto out;
     }
 
   if (strcmp("--what", argv[5]) != 0)
     {
-      _dbus_warn ("Unexpected argv[5] in shell success service test (expected: %s, got: %s)\n",
+      _dbus_warn ("Unexpected argv[5] in shell success service test (expected: %s, got: %s)",
                    "--what", argv[5]);
       goto out;
     }
 
   if (strcmp("we put in", argv[6]) != 0)
     {
-      _dbus_warn ("Unexpected argv[6] in shell success service test (expected: %s, got: %s)\n",
+      _dbus_warn ("Unexpected argv[6] in shell success service test (expected: %s, got: %s)",
                    "we put in", argv[6]);
       goto out;
     }
@@ -4359,7 +4359,7 @@ check_oom_check1_func (void *data)
 
   if (!check_no_leftovers (d->context))
     {
-      _dbus_warn ("Messages were left over, should be covered by test suite\n");
+      _dbus_warn ("Messages were left over, should be covered by test suite");
       return FALSE;
     }
 
@@ -4436,7 +4436,7 @@ check_get_services (BusContext     *context,
   message = pop_message_waiting_for_memory (connection);
   if (message == NULL)
     {
-      _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+      _dbus_warn ("Did not receive a reply to %s %d on %p",
                  method, serial, connection);
       goto out;
     }
@@ -4488,7 +4488,7 @@ check_get_services (BusContext     *context,
          else
            {
              _dbus_assert (dbus_error_is_set (&error));
-             _dbus_warn ("Did not get the expected DBUS_TYPE_ARRAY from %s\n", method);
+             _dbus_warn ("Did not get the expected DBUS_TYPE_ARRAY from %s", method);
              goto out;
            }
        } else {
@@ -4537,7 +4537,7 @@ check_list_services (BusContext     *context,
 
   if (!_dbus_string_array_contains ((const char **)services, existent))
     {
-      _dbus_warn ("Did not get the expected %s from ListActivatableNames\n", existent);
+      _dbus_warn ("Did not get the expected %s from ListActivatableNames", existent);
       dbus_free_string_array (services);
       return FALSE;
     }
@@ -4595,7 +4595,7 @@ check_list_services (BusContext     *context,
   message = pop_message_waiting_for_memory (connection);
   if (message == NULL)
     {
-      _dbus_warn ("Did not receive any messages after %s %d on %p\n",
+      _dbus_warn ("Did not receive any messages after %s %d on %p",
                  "StartServiceByName", serial, connection);
       goto out;
     }
@@ -4607,7 +4607,7 @@ check_list_services (BusContext     *context,
     {
       if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
        {
-         _dbus_warn ("Message has wrong sender %s\n",
+         _dbus_warn ("Message has wrong sender %s",
                      dbus_message_get_sender (message) ?
                      dbus_message_get_sender (message) : "(none)");
          goto out;
@@ -4629,7 +4629,7 @@ check_list_services (BusContext     *context,
        }
       else
        {
-         _dbus_warn ("Did not expect error %s\n",
+         _dbus_warn ("Did not expect error %s",
                      dbus_message_get_error_name (message));
          goto out;
        }
@@ -4651,7 +4651,7 @@ check_list_services (BusContext     *context,
       message = dbus_connection_borrow_message (connection);
       if (message == NULL)
        {
-         _dbus_warn ("Did not receive any messages after base service creation notification\n");
+         _dbus_warn ("Did not receive any messages after base service creation notification");
          goto out;
        }
 
@@ -4666,7 +4666,7 @@ check_list_services (BusContext     *context,
        case GOT_ERROR:
        case GOT_SERVICE_DELETED:
          _dbus_warn ("Unexpected message after ActivateService "
-                     "(should be an error or a service announcement)\n");
+                     "(should be an error or a service announcement)");
          goto out;
 
        case GOT_SERVICE_CREATED:
@@ -4674,7 +4674,7 @@ check_list_services (BusContext     *context,
          if (message == NULL)
            {
              _dbus_warn ("Failed to pop message we just put back! "
-                         "should have been a NameOwnerChanged (creation)\n");
+                         "should have been a NameOwnerChanged (creation)");
              goto out;
            }
 
@@ -4687,7 +4687,7 @@ check_list_services (BusContext     *context,
 
          if (!check_no_leftovers (context))
            {
-             _dbus_warn ("Messages were left over after successful activation\n");
+             _dbus_warn ("Messages were left over after successful activation");
              goto out;
            }
 
@@ -4702,7 +4702,7 @@ check_list_services (BusContext     *context,
 
   if (!_dbus_string_array_contains ((const char **)services, existent))
     {
-      _dbus_warn ("Did not get the expected %s from ListNames\n", existent);
+      _dbus_warn ("Did not get the expected %s from ListNames", existent);
       goto out;
     }
 
@@ -4741,7 +4741,7 @@ check_oom_check2_func (void *data)
 
   if (!check_no_leftovers (d->context))
     {
-      _dbus_warn ("Messages were left over, should be covered by test suite\n");
+      _dbus_warn ("Messages were left over, should be covered by test suite");
       return FALSE;
     }
 
@@ -4763,7 +4763,7 @@ check2_try_iterations (BusContext     *context,
   if (!_dbus_test_oom_handling (description, check_oom_check2_func,
                                 &d))
     {
-      _dbus_warn ("%s failed during oom\n", description);
+      _dbus_warn ("%s failed during oom", description);
       _dbus_assert_not_reached ("test failed");
     }
 }
@@ -4894,7 +4894,7 @@ bus_dispatch_test_conf (const DBusString *test_data_dir,
 
   if (!check_no_leftovers (context))
     {
-      _dbus_warn ("Messages were left over after setting up initial connections\n");
+      _dbus_warn ("Messages were left over after setting up initial connections");
       _dbus_assert_not_reached ("initial connection setup failed");
     }
 
@@ -5068,7 +5068,7 @@ bus_dispatch_sha1_test (const DBusString *test_data_dir)
 
   if (!check_no_leftovers (context))
     {
-      _dbus_warn ("Messages were left over after setting up initial SHA-1 connection\n");
+      _dbus_warn ("Messages were left over after setting up initial SHA-1 connection");
       _dbus_assert_not_reached ("initial connection setup failed");
     }
 
index 1d36c51..a325cea 100644 (file)
@@ -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);
index ca884ef..a904f0a 100644 (file)
@@ -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;
index 2965f6e..f28aaa3 100644 (file)
@@ -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,
index 0df6bf8..e9ec7b9 100644 (file)
@@ -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);
index 2f59462..e4ba0ad 100644 (file)
@@ -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");
     }
index 355ec77..e03e677 100644 (file)
@@ -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");
     }
index 31ef4c8..76960a3 100644 (file)
@@ -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);
index 23f9268..8e397e5 100644 (file)
@@ -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);
index e42c8e5..5ec010f 100644 (file)
@@ -75,7 +75,7 @@ append_quoted_string (DBusString       *dest,
             a = '\\';
           else
             {
-              _dbus_warn ("bad backslashed byte %c\n", b);
+              _dbus_warn ("bad backslashed byte %c", b);
               return FALSE;
             }
 
@@ -287,7 +287,7 @@ _dbus_auth_script_run (const DBusString *filename)
     }
 
   if (!_dbus_file_get_contents (&file, filename, &error))    {
-      _dbus_warn ("Getting contents of %s failed: %s\n",
+      _dbus_warn ("Getting contents of %s failed: %s",
                   _dbus_string_get_const_data (filename), error.message);
       dbus_error_free (&error);
       goto out;
@@ -301,7 +301,7 @@ _dbus_auth_script_run (const DBusString *filename)
     {      
       line_no += 1;
 
-      /* _dbus_warn ("%s\n", _dbus_string_get_const_data (&line)); */
+      /* _dbus_warn ("%s", _dbus_string_get_const_data (&line)); */
       
       _dbus_string_delete_leading_blanks (&line);
 
@@ -372,14 +372,14 @@ _dbus_auth_script_run (const DBusString *filename)
           
           if (auth != NULL)
             {
-              _dbus_warn ("already created a DBusAuth (CLIENT or SERVER given twice)\n");
+              _dbus_warn ("already created a DBusAuth (CLIENT or SERVER given twice)");
               goto out;
             }
 
           auth = _dbus_auth_client_new ();
           if (auth == NULL)
             {
-              _dbus_warn ("no memory to create DBusAuth\n");
+              _dbus_warn ("no memory to create DBusAuth");
               goto out;
             }
 
@@ -390,7 +390,7 @@ _dbus_auth_script_run (const DBusString *filename)
           creds = _dbus_credentials_new_from_current_process ();
           if (creds == NULL)
             {
-              _dbus_warn ("no memory for credentials\n");
+              _dbus_warn ("no memory for credentials");
               _dbus_auth_unref (auth);
               auth = NULL;
               goto out;
@@ -398,7 +398,7 @@ _dbus_auth_script_run (const DBusString *filename)
               
           if (!_dbus_auth_set_credentials (auth, creds))
             {
-              _dbus_warn ("no memory for setting credentials\n");
+              _dbus_warn ("no memory for setting credentials");
               _dbus_auth_unref (auth);
               auth = NULL;
               _dbus_credentials_unref (creds);
@@ -414,14 +414,14 @@ _dbus_auth_script_run (const DBusString *filename)
           
           if (auth != NULL)
             {
-              _dbus_warn ("already created a DBusAuth (CLIENT or SERVER given twice)\n");
+              _dbus_warn ("already created a DBusAuth (CLIENT or SERVER given twice)");
               goto out;
             }
 
           auth = _dbus_auth_server_new (&guid);
           if (auth == NULL)
             {
-              _dbus_warn ("no memory to create DBusAuth\n");
+              _dbus_warn ("no memory to create DBusAuth");
               goto out;
             }
 
@@ -432,7 +432,7 @@ _dbus_auth_script_run (const DBusString *filename)
           creds = _dbus_credentials_new_from_current_process ();
           if (creds == NULL)
             {
-              _dbus_warn ("no memory for credentials\n");
+              _dbus_warn ("no memory for credentials");
               _dbus_auth_unref (auth);
               auth = NULL;
               goto out;
@@ -440,7 +440,7 @@ _dbus_auth_script_run (const DBusString *filename)
               
           if (!_dbus_auth_set_credentials (auth, creds))
             {
-              _dbus_warn ("no memory for setting credentials\n");
+              _dbus_warn ("no memory for setting credentials");
               _dbus_auth_unref (auth);
               auth = NULL;
               _dbus_credentials_unref (creds);
@@ -453,7 +453,7 @@ _dbus_auth_script_run (const DBusString *filename)
         }
       else if (auth == NULL)
         {
-          _dbus_warn ("must specify CLIENT or SERVER\n");
+          _dbus_warn ("must specify CLIENT or SERVER");
           goto out;
 
         }
@@ -491,13 +491,13 @@ _dbus_auth_script_run (const DBusString *filename)
 
           if (!_dbus_string_init (&to_send))
             {
-              _dbus_warn ("no memory to allocate string\n");
+              _dbus_warn ("no memory to allocate string");
               goto out;
             }
 
           if (!append_quoted_string (&to_send, &line))
             {
-              _dbus_warn ("failed to append quoted string line %d\n",
+              _dbus_warn ("failed to append quoted string line %d",
                           line_no);
               _dbus_string_free (&to_send);
               goto out;
@@ -507,7 +507,7 @@ _dbus_auth_script_run (const DBusString *filename)
           
           if (!_dbus_string_append (&to_send, "\r\n"))
             {
-              _dbus_warn ("failed to append \r\n from line %d\n",
+              _dbus_warn ("failed to append \\r\\n from line %d",
                           line_no);
               _dbus_string_free (&to_send);
               goto out;
@@ -524,14 +524,14 @@ _dbus_auth_script_run (const DBusString *filename)
 
                 if (!_dbus_string_init (&username))
                   {
-                    _dbus_warn ("no memory for userid\n");
+                    _dbus_warn ("no memory for userid");
                     _dbus_string_free (&to_send);
                     goto out;
                   }
 
                 if (!_dbus_append_user_from_current_process (&username))
                   {
-                    _dbus_warn ("no memory for userid\n");
+                    _dbus_warn ("no memory for userid");
                     _dbus_string_free (&username);
                     _dbus_string_free (&to_send);
                     goto out;
@@ -542,7 +542,7 @@ _dbus_auth_script_run (const DBusString *filename)
                 if (!_dbus_string_hex_encode (&username, 0,
                                              &to_send, where))
                   {
-                    _dbus_warn ("no memory to subst USERID_HEX\n");
+                    _dbus_warn ("no memory to subst USERID_HEX");
                     _dbus_string_free (&username);
                     _dbus_string_free (&to_send);
                     goto out;
@@ -557,14 +557,14 @@ _dbus_auth_script_run (const DBusString *filename)
                 
                 if (!_dbus_string_init (&username))
                   {
-                    _dbus_warn ("no memory for username\n");
+                    _dbus_warn ("no memory for username");
                     _dbus_string_free (&to_send);
                     goto out;
                   }
 
                 if (!_dbus_append_user_from_current_process (&username))
                   {
-                    _dbus_warn ("no memory for username\n");
+                    _dbus_warn ("no memory for username");
                     _dbus_string_free (&username);
                     _dbus_string_free (&to_send);
                     goto out;
@@ -575,7 +575,7 @@ _dbus_auth_script_run (const DBusString *filename)
                 if (!_dbus_string_hex_encode (&username, 0,
                                              &to_send, where))
                   {
-                    _dbus_warn ("no memory to subst USERNAME_HEX\n");
+                    _dbus_warn ("no memory to subst USERNAME_HEX");
                     _dbus_string_free (&username);
                     _dbus_string_free (&to_send);
                     goto out;
@@ -592,7 +592,7 @@ _dbus_auth_script_run (const DBusString *filename)
             if (!_dbus_string_copy (&to_send, 0,
                                     buffer, _dbus_string_get_length (buffer)))
               {
-                _dbus_warn ("not enough memory to call bytes_received, or can't add bytes to auth object already in end state\n");
+                _dbus_warn ("not enough memory to call bytes_received, or can't add bytes to auth object already in end state");
                 _dbus_string_free (&to_send);
                 _dbus_auth_return_buffer (auth, buffer);
                 goto out;
@@ -613,13 +613,13 @@ _dbus_auth_script_run (const DBusString *filename)
           expected = auth_state_from_string (&line);
           if (expected < 0)
             {
-              _dbus_warn ("bad auth state given to EXPECT_STATE\n");
+              _dbus_warn ("bad auth state given to EXPECT_STATE");
               goto parse_failed;
             }
 
           if (expected != state)
             {
-              _dbus_warn ("expected auth state %s but got %s on line %d\n",
+              _dbus_warn ("expected auth state %s but got %s on line %d",
                           auth_state_to_string (expected),
                           auth_state_to_string (state),
                           line_no);
@@ -635,13 +635,13 @@ _dbus_auth_script_run (const DBusString *filename)
 
           if (!_dbus_string_init (&received))
             {
-              _dbus_warn ("no mem to allocate string received\n");
+              _dbus_warn ("no mem to allocate string received");
               goto out;
             }
 
           if (!_dbus_string_pop_line (&from_auth, &received))
             {
-              _dbus_warn ("no line popped from the DBusAuth being tested, expected command %s on line %d\n",
+              _dbus_warn ("no line popped from the DBusAuth being tested, expected command %s on line %d",
                           _dbus_string_get_const_data (&line), line_no);
               _dbus_string_free (&received);
               goto out;
@@ -649,7 +649,7 @@ _dbus_auth_script_run (const DBusString *filename)
 
           if (!same_first_word (&received, &line))
             {
-              _dbus_warn ("line %d expected command '%s' and got '%s'\n",
+              _dbus_warn ("line %d expected command '%s' and got '%s'",
                           line_no,
                           _dbus_string_get_const_data (&line),
                           _dbus_string_get_const_data (&received));
@@ -669,13 +669,13 @@ _dbus_auth_script_run (const DBusString *filename)
 
           if (!_dbus_string_init (&expected))
             {
-              _dbus_warn ("no mem to allocate string expected\n");
+              _dbus_warn ("no mem to allocate string expected");
               goto out;
             }
 
           if (!append_quoted_string (&expected, &line))
             {
-              _dbus_warn ("failed to append quoted string line %d\n",
+              _dbus_warn ("failed to append quoted string line %d",
                           line_no);
               _dbus_string_free (&expected);
               goto out;
@@ -690,7 +690,7 @@ _dbus_auth_script_run (const DBusString *filename)
             }
           else
             {
-              _dbus_warn ("Expected unused bytes '%s' and have '%s'\n",
+              _dbus_warn ("Expected unused bytes '%s' and have '%s'",
                           _dbus_string_get_const_data (&expected),
                           _dbus_string_get_const_data (unused));
               _dbus_string_free (&expected);
@@ -705,7 +705,7 @@ _dbus_auth_script_run (const DBusString *filename)
           authorized_identity = _dbus_auth_get_identity (auth);
           if (!_dbus_credentials_are_anonymous (authorized_identity))
             {
-              _dbus_warn ("Expected anonymous login or failed login, but some credentials were authorized\n");
+              _dbus_warn ("Expected anonymous login or failed login, but some credentials were authorized");
               goto out;
             }
         }
@@ -717,7 +717,7 @@ _dbus_auth_script_run (const DBusString *filename)
           authorized_identity = _dbus_auth_get_identity (auth);
           if (_dbus_credentials_are_anonymous (authorized_identity))
             {
-              _dbus_warn ("Expected to have some credentials, but we don't\n");
+              _dbus_warn ("Expected to have some credentials, but we don't");
               goto out;
             }
         }
@@ -730,13 +730,13 @@ _dbus_auth_script_run (const DBusString *filename)
 
           if (!_dbus_string_init (&expected))
             {
-              _dbus_warn ("no mem to allocate string expected\n");
+              _dbus_warn ("no mem to allocate string expected");
               goto out;
             }
 
           if (!append_quoted_string (&expected, &line))
             {
-              _dbus_warn ("failed to append quoted string line %d\n",
+              _dbus_warn ("failed to append quoted string line %d",
                           line_no);
               _dbus_string_free (&expected);
               goto out;
@@ -751,7 +751,7 @@ _dbus_auth_script_run (const DBusString *filename)
             }
           else
             {
-              _dbus_warn ("Expected exact string '%s' and have '%s'\n",
+              _dbus_warn ("Expected exact string '%s' and have '%s'",
                           _dbus_string_get_const_data (&expected),
                           _dbus_string_get_const_data (&from_auth));
               _dbus_string_free (&expected);
@@ -765,7 +765,7 @@ _dbus_auth_script_run (const DBusString *filename)
       
     parse_failed:
       {
-        _dbus_warn ("couldn't process line %d \"%s\"\n",
+        _dbus_warn ("couldn't process line %d \"%s\"",
                     line_no, _dbus_string_get_const_data (&line));
         goto out;
       }
@@ -773,7 +773,7 @@ _dbus_auth_script_run (const DBusString *filename)
 
   if (auth == NULL)
     {
-      _dbus_warn ("Auth script is bogus, did not even have CLIENT or SERVER\n");
+      _dbus_warn ("Auth script is bogus, did not even have CLIENT or SERVER");
       goto out;
     }
   else if (state == DBUS_AUTH_STATE_AUTHENTICATED)
@@ -784,15 +784,15 @@ _dbus_auth_script_run (const DBusString *filename)
 
       if (_dbus_string_get_length (unused) > 0)
         {
-          _dbus_warn ("did not expect unused bytes (scripts must specify explicitly if they are expected)\n");
+          _dbus_warn ("did not expect unused bytes (scripts must specify explicitly if they are expected)");
           goto out;
         }
     }
 
   if (_dbus_string_get_length (&from_auth) > 0)
     {
-      _dbus_warn ("script did not have EXPECT_ statements for all the data received from the DBusAuth\n");
-      _dbus_warn ("Leftover data: %s\n", _dbus_string_get_const_data (&from_auth));
+      _dbus_warn ("script did not have EXPECT_ statements for all the data received from the DBusAuth");
+      _dbus_warn ("Leftover data: %s", _dbus_string_get_const_data (&from_auth));
       goto out;
     }
   
index 3675884..b1a5ee4 100644 (file)
@@ -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;
index 0fd4831..b96b1b2 100644 (file)
@@ -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);
     }
index 81b3a83..365fd45 100644 (file)
@@ -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;
     }
index bb7e4f8..6512a1d 100644 (file)
@@ -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");
     }
index f6736fe..adb7614 100644 (file)
@@ -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
index b5b0d4b..4352e52 100644 (file)
@@ -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)
index 5787485..80fc013 100644 (file)
@@ -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");
         }
       
index 309da26..136a762 100644 (file)
@@ -304,7 +304,7 @@ real_check_expected_type (DBusTypeReader *reader,
 
   if (t != expected)
     {
-      _dbus_warn ("Read type %s while expecting %s at %s line %d\n",
+      _dbus_warn ("Read type %s while expecting %s at %s line %d",
                   _dbus_type_to_string (t),
                   _dbus_type_to_string (expected),
                   funcname, line);
@@ -317,7 +317,7 @@ real_check_expected_type (DBusTypeReader *reader,
 
 #define NEXT_EXPECTING_TRUE(reader)  do { if (!_dbus_type_reader_next (reader))         \
  {                                                                                      \
-    _dbus_warn ("_dbus_type_reader_next() should have returned TRUE at %s %d\n",        \
+    _dbus_warn ("_dbus_type_reader_next() should have returned TRUE at %s %d",          \
                               _DBUS_FUNCTION_NAME, __LINE__);                           \
     _dbus_assert_not_reached ("test failed");                                           \
  }                                                                                      \
@@ -325,7 +325,7 @@ real_check_expected_type (DBusTypeReader *reader,
 
 #define NEXT_EXPECTING_FALSE(reader) do { if (_dbus_type_reader_next (reader))          \
  {                                                                                      \
-    _dbus_warn ("_dbus_type_reader_next() should have returned FALSE at %s %d\n",       \
+    _dbus_warn ("_dbus_type_reader_next() should have returned FALSE at %s %d",         \
                               _DBUS_FUNCTION_NAME, __LINE__);                           \
     _dbus_assert_not_reached ("test failed");                                           \
  }                                                                                      \
@@ -1320,7 +1320,7 @@ run_test_delete_values (NodeIterationData *nid)
               while (elem > 0)
                 {
                   if (!_dbus_type_reader_next (&array))
-                    _dbus_assert_not_reached ("should have had another element\n");
+                    _dbus_assert_not_reached ("should have had another element");
                   --elem;
                 }
 
@@ -1395,7 +1395,7 @@ run_test_nodes_iteration (void *data)
   if (!_dbus_string_equal_substring (nid->signature, 0, _dbus_string_get_length (nid->signature),
                                      &nid->block->signature, nid->type_offset))
     {
-      _dbus_warn ("Expected signature '%s' and got '%s' with initial offset %d\n",
+      _dbus_warn ("Expected signature '%s' and got '%s' with initial offset %d",
                   _dbus_string_get_const_data (nid->signature),
                   _dbus_string_get_const_data_len (&nid->block->signature, nid->type_offset, 0),
                   nid->type_offset);
@@ -2185,7 +2185,7 @@ int16_read_multi (TestTypeNode   *node,
                                       &n_elements);
 
   if (n_elements != count)
-    _dbus_warn ("got %d elements expected %d\n", n_elements, count);
+    _dbus_warn ("got %d elements expected %d", n_elements, count);
   _dbus_assert (n_elements == count);
 
   for (i = 0; i < count; i++)
@@ -2322,7 +2322,7 @@ int32_read_multi (TestTypeNode   *node,
                                       &n_elements);
 
   if (n_elements != count)
-    _dbus_warn ("got %d elements expected %d\n", n_elements, count);
+    _dbus_warn ("got %d elements expected %d", n_elements, count);
   _dbus_assert (n_elements == count);
 
   for (i = 0; i < count; i++)
@@ -2477,7 +2477,7 @@ string_read_value (TestTypeNode   *node,
 
   if (strcmp (buf, v) != 0)
     {
-      _dbus_warn ("read string '%s' expected '%s'\n",
+      _dbus_warn ("read string '%s' expected '%s'",
                   v, buf);
       _dbus_assert_not_reached ("test failed");
     }
@@ -2648,7 +2648,7 @@ double_read_value (TestTypeNode   *node,
 
   if (!_DBUS_DOUBLES_BITWISE_EQUAL (v, expected))
     {
-      _dbus_warn ("Expected double %g got %g\n bits = 0x%" PRIx64 " vs.\n bits = 0x%" PRIx64 ")\n",
+      _dbus_warn ("Expected double %g got %g\n bits = 0x%" PRIx64 " vs.\n bits = 0x%" PRIx64 ")",
                   expected, v,
                   *(dbus_uint64_t*)(char*)&expected,
                   *(dbus_uint64_t*)(char*)&v);
@@ -2745,7 +2745,7 @@ object_path_read_value (TestTypeNode   *node,
 
   if (strcmp (buf, v) != 0)
     {
-      _dbus_warn ("read object path '%s' expected '%s'\n",
+      _dbus_warn ("read object path '%s' expected '%s'",
                   v, buf);
       _dbus_assert_not_reached ("test failed");
     }
@@ -2820,7 +2820,7 @@ signature_read_value (TestTypeNode   *node,
 
   if (strcmp (buf, v) != 0)
     {
-      _dbus_warn ("read signature value '%s' expected '%s'\n",
+      _dbus_warn ("read signature value '%s' expected '%s'",
                   v, buf);
       _dbus_assert_not_reached ("test failed");
     }
index 7fe94b0..417068c 100644 (file)
@@ -1024,7 +1024,7 @@ _dbus_type_reader_recurse (DBusTypeReader *reader,
       _dbus_verbose ("recursing into type %s\n", _dbus_type_to_string (t));
 #ifndef DBUS_DISABLE_CHECKS
       if (t == DBUS_TYPE_INVALID)
-        _dbus_warn_check_failed ("You can't recurse into an empty array or off the end of a message body\n");
+        _dbus_warn_check_failed ("You can't recurse into an empty array or off the end of a message body");
 #endif /* DBUS_DISABLE_CHECKS */
 
       _dbus_assert_not_reached ("don't yet handle recursing into this type");
@@ -1666,13 +1666,13 @@ writer_recurse_init_and_check (DBusTypeWriter *writer,
         {
           if (expected != DBUS_TYPE_INVALID)
             _dbus_warn_check_failed ("Writing an element of type %s, but the expected type here is %s\n"
-                                     "The overall signature expected here was '%s' and we are on byte %d of that signature.\n",
+                                     "The overall signature expected here was '%s' and we are on byte %d of that signature.",
                                      _dbus_type_to_string (sub->container_type),
                                      _dbus_type_to_string (expected),
                                      _dbus_string_get_const_data (writer->type_str), writer->type_pos);
           else
             _dbus_warn_check_failed ("Writing an element of type %s, but no value is expected here\n"
-                                     "The overall signature expected here was '%s' and we are on byte %d of that signature.\n",
+                                     "The overall signature expected here was '%s' and we are on byte %d of that signature.",
                                      _dbus_type_to_string (sub->container_type),
                                      _dbus_string_get_const_data (writer->type_str), writer->type_pos);
           
@@ -1732,12 +1732,12 @@ write_or_verify_typecode (DBusTypeWriter *writer,
           {
             if (expected != DBUS_TYPE_INVALID)
               _dbus_warn_check_failed ("Array or variant type requires that type %s be written, but %s was written.\n"
-                                       "The overall signature expected here was '%s' and we are on byte %d of that signature.\n",
+                                       "The overall signature expected here was '%s' and we are on byte %d of that signature.",
                                        _dbus_type_to_string (expected), _dbus_type_to_string (typecode),
                                        _dbus_string_get_const_data (writer->type_str), writer->type_pos);
             else
               _dbus_warn_check_failed ("Array or variant type wasn't expecting any more values to be written into it, but a value %s was written.\n"
-                                       "The overall signature expected here was '%s' and we are on byte %d of that signature.\n",
+                                       "The overall signature expected here was '%s' and we are on byte %d of that signature.",
                                        _dbus_type_to_string (typecode),
                                        _dbus_string_get_const_data (writer->type_str), writer->type_pos);
             _dbus_assert_not_reached ("bad type inserted somewhere inside an array or variant");
@@ -1830,7 +1830,7 @@ writer_recurse_array (DBusTypeWriter   *writer,
                                          writer->type_str,
                                          writer->u.array.element_type_pos + 1))
         {
-          _dbus_warn_check_failed ("Writing an array of '%s' but this is incompatible with the expected type of elements in the parent array\n",
+          _dbus_warn_check_failed ("Writing an array of '%s' but this is incompatible with the expected type of elements in the parent array",
                                    _dbus_string_get_const_data_len (contained_type,
                                                                     contained_type_start,
                                                                     contained_type_len));
index e11e1ac..2bd798a 100644 (file)
@@ -57,7 +57,7 @@ run_validity_tests (const ValidityTest *tests,
 
       if (v != tests[i].expected)
         {
-          _dbus_warn ("Improper validation result %d for '%s'\n",
+          _dbus_warn ("Improper validation result %d for '%s'",
                       v, tests[i].data);
           _dbus_assert_not_reached ("test failed");
         }
@@ -243,7 +243,7 @@ _dbus_marshal_validate_test (void)
       if (!_dbus_validate_path (&str, 0,
                                 _dbus_string_get_length (&str)))
         {
-          _dbus_warn ("Path \"%s\" should have been valid\n", valid_paths[i]);
+          _dbus_warn ("Path \"%s\" should have been valid", valid_paths[i]);
           _dbus_assert_not_reached ("invalid path");
         }
 
@@ -258,7 +258,7 @@ _dbus_marshal_validate_test (void)
       if (_dbus_validate_path (&str, 0,
                                _dbus_string_get_length (&str)))
         {
-          _dbus_warn ("Path \"%s\" should have been invalid\n", invalid_paths[i]);
+          _dbus_warn ("Path \"%s\" should have been invalid", invalid_paths[i]);
           _dbus_assert_not_reached ("valid path");
         }
 
@@ -274,7 +274,7 @@ _dbus_marshal_validate_test (void)
       if (!_dbus_validate_interface (&str, 0,
                                      _dbus_string_get_length (&str)))
         {
-          _dbus_warn ("Interface \"%s\" should have been valid\n", valid_interfaces[i]);
+          _dbus_warn ("Interface \"%s\" should have been valid", valid_interfaces[i]);
           _dbus_assert_not_reached ("invalid interface");
         }
 
@@ -289,7 +289,7 @@ _dbus_marshal_validate_test (void)
       if (_dbus_validate_interface (&str, 0,
                                     _dbus_string_get_length (&str)))
         {
-          _dbus_warn ("Interface \"%s\" should have been invalid\n", invalid_interfaces[i]);
+          _dbus_warn ("Interface \"%s\" should have been invalid", invalid_interfaces[i]);
           _dbus_assert_not_reached ("valid interface");
         }
 
@@ -307,7 +307,7 @@ _dbus_marshal_validate_test (void)
       if (!_dbus_validate_bus_name (&str, 0,
                                    _dbus_string_get_length (&str)))
         {
-          _dbus_warn ("Bus name \"%s\" should have been valid\n", valid_interfaces[i]);
+          _dbus_warn ("Bus name \"%s\" should have been valid", valid_interfaces[i]);
           _dbus_assert_not_reached ("invalid bus name");
         }
 
@@ -324,7 +324,7 @@ _dbus_marshal_validate_test (void)
           if (_dbus_validate_bus_name (&str, 0,
                                        _dbus_string_get_length (&str)))
             {
-              _dbus_warn ("Bus name \"%s\" should have been invalid\n", invalid_interfaces[i]);
+              _dbus_warn ("Bus name \"%s\" should have been invalid", invalid_interfaces[i]);
               _dbus_assert_not_reached ("valid bus name");
             }
         }
@@ -341,7 +341,7 @@ _dbus_marshal_validate_test (void)
       if (!_dbus_validate_bus_name (&str, 0,
                                     _dbus_string_get_length (&str)))
         {
-          _dbus_warn ("Bus name \"%s\" should have been valid\n", valid_unique_names[i]);
+          _dbus_warn ("Bus name \"%s\" should have been valid", valid_unique_names[i]);
           _dbus_assert_not_reached ("invalid unique name");
         }
 
@@ -356,7 +356,7 @@ _dbus_marshal_validate_test (void)
       if (_dbus_validate_bus_name (&str, 0,
                                    _dbus_string_get_length (&str)))
         {
-          _dbus_warn ("Bus name \"%s\" should have been invalid\n", invalid_unique_names[i]);
+          _dbus_warn ("Bus name \"%s\" should have been invalid", invalid_unique_names[i]);
           _dbus_assert_not_reached ("valid unique name");
         }
 
@@ -374,7 +374,7 @@ _dbus_marshal_validate_test (void)
       if (!_dbus_validate_error_name (&str, 0,
                                       _dbus_string_get_length (&str)))
         {
-          _dbus_warn ("Error name \"%s\" should have been valid\n", valid_interfaces[i]);
+          _dbus_warn ("Error name \"%s\" should have been valid", valid_interfaces[i]);
           _dbus_assert_not_reached ("invalid error name");
         }
 
@@ -391,7 +391,7 @@ _dbus_marshal_validate_test (void)
           if (_dbus_validate_error_name (&str, 0,
                                          _dbus_string_get_length (&str)))
             {
-              _dbus_warn ("Error name \"%s\" should have been invalid\n", invalid_interfaces[i]);
+              _dbus_warn ("Error name \"%s\" should have been invalid", invalid_interfaces[i]);
               _dbus_assert_not_reached ("valid error name");
             }
         }
@@ -408,7 +408,7 @@ _dbus_marshal_validate_test (void)
       if (!_dbus_validate_member (&str, 0,
                                   _dbus_string_get_length (&str)))
         {
-          _dbus_warn ("Member \"%s\" should have been valid\n", valid_members[i]);
+          _dbus_warn ("Member \"%s\" should have been valid", valid_members[i]);
           _dbus_assert_not_reached ("invalid member");
         }
 
@@ -423,7 +423,7 @@ _dbus_marshal_validate_test (void)
       if (_dbus_validate_member (&str, 0,
                                  _dbus_string_get_length (&str)))
         {
-          _dbus_warn ("Member \"%s\" should have been invalid\n", invalid_members[i]);
+          _dbus_warn ("Member \"%s\" should have been invalid", invalid_members[i]);
           _dbus_assert_not_reached ("valid member");
         }
 
@@ -439,7 +439,7 @@ _dbus_marshal_validate_test (void)
       if (!_dbus_validate_signature (&str, 0,
                                      _dbus_string_get_length (&str)))
         {
-          _dbus_warn ("Signature \"%s\" should have been valid\n", valid_signatures[i]);
+          _dbus_warn ("Signature \"%s\" should have been valid", valid_signatures[i]);
           _dbus_assert_not_reached ("invalid signature");
         }
 
@@ -454,7 +454,7 @@ _dbus_marshal_validate_test (void)
       if (_dbus_validate_signature (&str, 0,
                                     _dbus_string_get_length (&str)))
         {
-          _dbus_warn ("Signature \"%s\" should have been invalid\n", invalid_signatures[i]);
+          _dbus_warn ("Signature \"%s\" should have been invalid", invalid_signatures[i]);
           _dbus_assert_not_reached ("valid signature");
         }
 
@@ -537,7 +537,7 @@ _dbus_marshal_validate_test (void)
                                                     _dbus_string_get_length (&body));
         if (validity != DBUS_VALID)
           {
-            _dbus_warn ("invalid code %d expected valid on sequence %d little endian\n",
+            _dbus_warn ("invalid code %d expected valid on sequence %d little endian",
                         validity, sequence);
             _dbus_verbose_bytes_of_string (&signature, 0, _dbus_string_get_length (&signature));
             _dbus_verbose_bytes_of_string (&body, 0, _dbus_string_get_length (&body));
@@ -562,7 +562,7 @@ _dbus_marshal_validate_test (void)
                                                     _dbus_string_get_length (&body));
         if (validity != DBUS_VALID)
           {
-            _dbus_warn ("invalid code %d expected valid on sequence %d big endian\n",
+            _dbus_warn ("invalid code %d expected valid on sequence %d big endian",
                         validity, sequence);
             _dbus_verbose_bytes_of_string (&signature, 0, _dbus_string_get_length (&signature));
             _dbus_verbose_bytes_of_string (&body, 0, _dbus_string_get_length (&body));
index 67d5cb0..bba9884 100644 (file)
@@ -364,7 +364,7 @@ check_guards (void       *free_block,
           dbus_uint32_t value = *(dbus_uint32_t*) &block[i];
           if (value != GUARD_VALUE)
             {
-              _dbus_warn ("Block of %lu bytes from %s had start guard value 0x%ux at %d expected 0x%x\n",
+              _dbus_warn ("Block of %lu bytes from %s had start guard value 0x%ux at %d expected 0x%x",
                           (long) requested_bytes, source_string (source),
                           value, i, GUARD_VALUE);
               failed = TRUE;
@@ -379,7 +379,7 @@ check_guards (void       *free_block,
           dbus_uint32_t value = *(dbus_uint32_t*) &block[i];
           if (value != GUARD_VALUE)
             {
-              _dbus_warn ("Block of %lu bytes from %s had end guard value 0x%ux at %d expected 0x%x\n",
+              _dbus_warn ("Block of %lu bytes from %s had end guard value 0x%ux at %d expected 0x%x",
                           (long) requested_bytes, source_string (source),
                           value, i, GUARD_VALUE);
               failed = TRUE;
@@ -486,7 +486,7 @@ dbus_malloc (size_t bytes)
         }
       else if (malloc_cannot_fail)
         {
-          _dbus_warn ("out of memory: malloc (%ld + %ld)\n",
+          _dbus_warn ("out of memory: malloc (%ld + %ld)",
               (long) bytes, (long) GUARD_EXTRA_SIZE);
           _dbus_abort ();
         }
@@ -506,7 +506,7 @@ dbus_malloc (size_t bytes)
         }
       else if (malloc_cannot_fail)
         {
-          _dbus_warn ("out of memory: malloc (%ld)\n", (long) bytes);
+          _dbus_warn ("out of memory: malloc (%ld)", (long) bytes);
           _dbus_abort ();
         }
 #endif
@@ -558,7 +558,7 @@ dbus_malloc0 (size_t bytes)
         }
       else if (malloc_cannot_fail)
         {
-          _dbus_warn ("out of memory: calloc (%ld + %ld, 1)\n",
+          _dbus_warn ("out of memory: calloc (%ld + %ld, 1)",
               (long) bytes, (long) GUARD_EXTRA_SIZE);
           _dbus_abort ();
         }
@@ -578,7 +578,7 @@ dbus_malloc0 (size_t bytes)
         }
       else if (malloc_cannot_fail)
         {
-          _dbus_warn ("out of memory: calloc (%ld)\n", (long) bytes);
+          _dbus_warn ("out of memory: calloc (%ld)", (long) bytes);
           _dbus_abort ();
         }
 #endif
@@ -636,7 +636,7 @@ dbus_realloc (void  *memory,
             {
               if (malloc_cannot_fail)
                 {
-                  _dbus_warn ("out of memory: realloc (%p, %ld + %ld)\n",
+                  _dbus_warn ("out of memory: realloc (%p, %ld + %ld)",
                       memory, (long) bytes, (long) GUARD_EXTRA_SIZE);
                   _dbus_abort ();
                 }
@@ -663,7 +663,7 @@ dbus_realloc (void  *memory,
             }
           else if (malloc_cannot_fail)
             {
-              _dbus_warn ("out of memory: malloc (%ld + %ld)\n",
+              _dbus_warn ("out of memory: malloc (%ld + %ld)",
                   (long) bytes, (long) GUARD_EXTRA_SIZE);
               _dbus_abort ();
             }
@@ -680,7 +680,7 @@ dbus_realloc (void  *memory,
 #ifdef DBUS_ENABLE_EMBEDDED_TESTS
       if (mem == NULL && malloc_cannot_fail)
         {
-          _dbus_warn ("out of memory: malloc (%ld)\n", (long) bytes);
+          _dbus_warn ("out of memory: malloc (%ld)", (long) bytes);
           _dbus_abort ();
         }
 
index 1096b45..60133e1 100644 (file)
@@ -132,7 +132,7 @@ check_memleaks (void)
 
   if (_dbus_get_malloc_blocks_outstanding () != 0)
     {
-      _dbus_warn ("%d dbus_malloc blocks were not freed in %s\n",
+      _dbus_warn ("%d dbus_malloc blocks were not freed in %s",
                   _dbus_get_malloc_blocks_outstanding (), __FILE__);
       _dbus_assert_not_reached ("memleaks");
     }
@@ -230,7 +230,7 @@ _dbus_check_fdleaks_leave (DBusInitialFDs *fds)
           if (FD_ISSET (fd, &fds->set))
             continue;
 
-          _dbus_warn ("file descriptor %i leaked in %s.\n", fd, __FILE__);
+          _dbus_warn ("file descriptor %i leaked in %s.", fd, __FILE__);
           _dbus_assert_not_reached ("fdleaks");
         }
 
@@ -254,7 +254,7 @@ check_have_valid_message (DBusMessageLoader *loader)
 
   if (_dbus_message_loader_get_is_corrupted (loader))
     {
-      _dbus_warn ("loader corrupted on message that was expected to be valid; invalid reason %d\n",
+      _dbus_warn ("loader corrupted on message that was expected to be valid; invalid reason %d",
                   loader->corruption_reason);
       goto failed;
     }
@@ -262,13 +262,13 @@ check_have_valid_message (DBusMessageLoader *loader)
   message = _dbus_message_loader_pop_message (loader);
   if (message == NULL)
     {
-      _dbus_warn ("didn't load message that was expected to be valid (message not popped)\n");
+      _dbus_warn ("didn't load message that was expected to be valid (message not popped)");
       goto failed;
     }
 
   if (_dbus_string_get_length (&loader->data) > 0)
     {
-      _dbus_warn ("had leftover bytes from expected-to-be-valid single message\n");
+      _dbus_warn ("had leftover bytes from expected-to-be-valid single message");
       goto failed;
     }
 
@@ -303,7 +303,7 @@ check_invalid_message (DBusMessageLoader *loader,
 
   if (!_dbus_message_loader_get_is_corrupted (loader))
     {
-      _dbus_warn ("loader not corrupted on message that was expected to be invalid\n");
+      _dbus_warn ("loader not corrupted on message that was expected to be invalid");
       goto failed;
     }
 
@@ -312,7 +312,7 @@ check_invalid_message (DBusMessageLoader *loader,
   if (expected_validity != DBUS_INVALID_FOR_UNKNOWN_REASON &&
       loader->corruption_reason != expected_validity)
     {
-      _dbus_warn ("expected message to be corrupted for reason %d and was corrupted for %d instead\n",
+      _dbus_warn ("expected message to be corrupted for reason %d and was corrupted for %d instead",
                   expected_validity, loader->corruption_reason);
       goto failed;
     }
@@ -334,7 +334,7 @@ check_incomplete_message (DBusMessageLoader *loader)
 
   if (_dbus_message_loader_get_is_corrupted (loader))
     {
-      _dbus_warn ("loader corrupted on message that was expected to be valid (but incomplete), corruption reason %d\n",
+      _dbus_warn ("loader corrupted on message that was expected to be valid (but incomplete), corruption reason %d",
                   loader->corruption_reason);
       goto failed;
     }
@@ -342,7 +342,7 @@ check_incomplete_message (DBusMessageLoader *loader)
   message = _dbus_message_loader_pop_message (loader);
   if (message != NULL)
     {
-      _dbus_warn ("loaded message that was expected to be incomplete\n");
+      _dbus_warn ("loaded message that was expected to be incomplete");
       goto failed;
     }
 
@@ -400,7 +400,7 @@ dbus_internal_do_not_use_load_message_file (const DBusString    *filename,
   _dbus_verbose ("Loading raw %s\n", _dbus_string_get_const_data (filename));
   if (!_dbus_file_get_contents (data, filename, &error))
     {
-      _dbus_warn ("Could not load message file %s: %s\n",
+      _dbus_warn ("Could not load message file %s: %s",
                   _dbus_string_get_const_data (filename),
                   error.message);
       dbus_error_free (&error);
@@ -432,7 +432,7 @@ dbus_internal_do_not_use_try_message_file (const DBusString    *filename,
   retval = FALSE;
 
   if (!_dbus_string_init (&data))
-    _dbus_assert_not_reached ("could not allocate string\n");
+    _dbus_assert_not_reached ("could not allocate string");
 
   if (!dbus_internal_do_not_use_load_message_file (filename, &data))
     goto failed;
@@ -447,7 +447,7 @@ dbus_internal_do_not_use_try_message_file (const DBusString    *filename,
         _dbus_verbose_bytes_of_string (&data, 0,
                                        _dbus_string_get_length (&data));
 
-      _dbus_warn ("Failed message loader test on %s\n",
+      _dbus_warn ("Failed message loader test on %s",
                   _dbus_string_get_const_data (filename));
     }
 
@@ -589,7 +589,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);
@@ -643,7 +643,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);
@@ -874,7 +874,7 @@ verify_test_message (DBusMessage *message)
                                    &our_string_array, &our_string_array_len,
                                   0))
     {
-      _dbus_warn ("error: %s - %s\n", error.name,
+      _dbus_warn ("error: %s - %s", error.name,
                   (error.message != NULL) ? error.message : "no message");
       _dbus_assert_not_reached ("Could not get arguments");
     }
@@ -1005,7 +1005,7 @@ verify_test_message_args_ignored (DBusMessage *message)
   if (!dbus_message_iter_get_args (&iter, &error,
                                    DBUS_TYPE_INVALID))
     {
-      _dbus_warn ("error: %s - %s\n", error.name,
+      _dbus_warn ("error: %s - %s", error.name,
                      (error.message != NULL) ? error.message : "no message");
     }
   else
@@ -1020,7 +1020,7 @@ verify_test_message_args_ignored (DBusMessage *message)
                                    DBUS_TYPE_UINT32, &our_uint,
                                    DBUS_TYPE_INVALID))
     {
-      _dbus_warn ("error: %s - %s\n", error.name,
+      _dbus_warn ("error: %s - %s", error.name,
                      (error.message != NULL) ? error.message : "no message");
     }
   else
@@ -1076,7 +1076,7 @@ verify_test_message_memleak (DBusMessage *message)
     }
   else
     {
-      _dbus_warn ("error: parse with wrong signature: 'uashuu'.\n");
+      _dbus_warn ("error: parse with wrong signature: 'uashuu'.");
     }
 
   /* parse with wrong signature: "uashuashu" */
@@ -1110,7 +1110,7 @@ verify_test_message_memleak (DBusMessage *message)
     }
   else
     {
-      _dbus_warn ("error: parse with wrong signature: 'uashuashu'.\n");
+      _dbus_warn ("error: parse with wrong signature: 'uashuashu'.");
     }
 
   /* parse with correct signature: "uashuash" */
@@ -1131,7 +1131,7 @@ verify_test_message_memleak (DBusMessage *message)
 #endif
                                    DBUS_TYPE_INVALID))
     {
-      _dbus_warn ("error: %s - %s\n", error.name,
+      _dbus_warn ("error: %s - %s", error.name,
                   (error.message != NULL) ? error.message : "no message");
       _dbus_assert_not_reached ("Could not get arguments");
     }
@@ -1748,7 +1748,7 @@ _dbus_message_test (const char *test_data_dir)
         if (!dbus_internal_do_not_use_try_message_data (&mdata.data,
                                                         mdata.expected_validity))
           {
-            _dbus_warn ("expected validity %d and did not get it\n",
+            _dbus_warn ("expected validity %d and did not get it",
                         mdata.expected_validity);
             _dbus_assert_not_reached ("message data failed");
           }
index e22fe51..547f248 100644 (file)
@@ -636,7 +636,7 @@ close_unix_fds(int *fds, unsigned *n_fds)
     {
       if (!_dbus_close(fds[i], &e))
         {
-          _dbus_warn("Failed to close file descriptor: %s\n", e.message);
+          _dbus_warn("Failed to close file descriptor: %s", e.message);
           dbus_error_free(&e);
         }
     }
@@ -761,7 +761,7 @@ _dbus_message_iter_check (DBusMessageRealIter *iter)
 
   if (iter == NULL)
     {
-      _dbus_warn_check_failed ("dbus message iterator is NULL\n");
+      _dbus_warn_check_failed ("dbus message iterator is NULL");
       return FALSE;
     }
 
@@ -771,7 +771,7 @@ _dbus_message_iter_check (DBusMessageRealIter *iter)
     {
       if (iter->u.reader.byte_order != byte_order)
         {
-          _dbus_warn_check_failed ("dbus message changed byte order since iterator was created\n");
+          _dbus_warn_check_failed ("dbus message changed byte order since iterator was created");
           return FALSE;
         }
       /* because we swap the message into compiler order when you init an iter */
@@ -781,7 +781,7 @@ _dbus_message_iter_check (DBusMessageRealIter *iter)
     {
       if (iter->u.writer.byte_order != byte_order)
         {
-          _dbus_warn_check_failed ("dbus message changed byte order since append iterator was created\n");
+          _dbus_warn_check_failed ("dbus message changed byte order since append iterator was created");
           return FALSE;
         }
       /* because we swap the message into compiler order when you init an iter */
@@ -789,13 +789,13 @@ _dbus_message_iter_check (DBusMessageRealIter *iter)
     }
   else
     {
-      _dbus_warn_check_failed ("dbus message iterator looks uninitialized or corrupted\n");
+      _dbus_warn_check_failed ("dbus message iterator looks uninitialized or corrupted");
       return FALSE;
     }
 
   if (iter->changed_stamp != iter->message->changed_stamp)
     {
-      _dbus_warn_check_failed ("dbus message iterator invalid because the message has been modified (or perhaps the iterator is just uninitialized)\n");
+      _dbus_warn_check_failed ("dbus message iterator invalid because the message has been modified (or perhaps the iterator is just uninitialized)");
       return FALSE;
     }
 
@@ -995,7 +995,7 @@ _dbus_message_iter_get_args_valist (DBusMessageIter *iter,
 #ifndef DBUS_DISABLE_CHECKS
           else
             {
-              _dbus_warn ("you can't read arrays of container types (struct, variant, array) with %s for now\n",
+              _dbus_warn ("you can't read arrays of container types (struct, variant, array) with %s for now",
                           _DBUS_FUNCTION_NAME);
               goto out;
             }
@@ -1004,7 +1004,7 @@ _dbus_message_iter_get_args_valist (DBusMessageIter *iter,
 #ifndef DBUS_DISABLE_CHECKS
       else
         {
-          _dbus_warn ("you can only read arrays and basic types with %s for now\n",
+          _dbus_warn ("you can only read arrays and basic types with %s for now",
                       _DBUS_FUNCTION_NAME);
           goto out;
         }
@@ -1928,7 +1928,7 @@ dbus_message_append_args_valist (DBusMessage *message,
             }
           else
             {
-              _dbus_warn ("arrays of %s can't be appended with %s for now\n",
+              _dbus_warn ("arrays of %s can't be appended with %s for now",
                           _dbus_type_to_string (element_type),
                           _DBUS_FUNCTION_NAME);
               goto failed;
@@ -1940,7 +1940,7 @@ dbus_message_append_args_valist (DBusMessage *message,
 #ifndef DBUS_DISABLE_CHECKS
       else
         {
-          _dbus_warn ("type %s isn't supported yet in %s\n",
+          _dbus_warn ("type %s isn't supported yet in %s",
                       _dbus_type_to_string (type), _DBUS_FUNCTION_NAME);
           goto failed;
         }
@@ -2664,7 +2664,7 @@ _dbus_message_iter_append_check (DBusMessageRealIter *iter)
 
   if (iter->message->locked)
     {
-      _dbus_warn_check_failed ("dbus append iterator can't be used: message is locked (has already been sent)\n");
+      _dbus_warn_check_failed ("dbus append iterator can't be used: message is locked (has already been sent)");
       return FALSE;
     }
 
index 22565ef..afbd61f 100644 (file)
@@ -647,7 +647,7 @@ _dbus_object_tree_unregister_and_unlock (DBusObjectTree          *tree,
 #ifndef DBUS_DISABLE_CHECKS
   if (found_subtree == FALSE)
     {
-      _dbus_warn ("Attempted to unregister path (path[0] = %s path[1] = %s) which isn't registered\n",
+      _dbus_warn ("Attempted to unregister path (path[0] = %s path[1] = %s) which isn't registered",
                   path[0] ? path[0] : "null",
                   (path[0] && path[1]) ? path[1] : "null");
       goto unlock;    
@@ -1634,7 +1634,7 @@ run_decompose_tests (void)
                          (const char**) result) != STR_EQUAL)
         {
           int real_len = _dbus_string_array_length ((const char**)result);
-          _dbus_warn ("Expected decompose of %s to have len %d, returned %d, appears to have %d\n",
+          _dbus_warn ("Expected decompose of %s to have len %d, returned %d, appears to have %d",
                       decompose_tests[i].path, expected_len, result_len,
                       real_len);
           _dbus_warn ("Decompose resulted in elements: { ");
@@ -1645,7 +1645,7 @@ run_decompose_tests (void)
                           (i + 1) == real_len ? "" : ", ");
               ++i;
             }
-          _dbus_warn ("}\n");
+          _dbus_warn ("}");
           _dbus_assert_not_reached ("path decompose failed");
         }
 
index 9af906f..3adbd82 100644 (file)
@@ -962,7 +962,7 @@ dbus_server_set_watch_functions (DBusServer              *server,
     }
   else
     {
-      _dbus_warn_check_failed ("Re-entrant call to %s\n", _DBUS_FUNCTION_NAME);
+      _dbus_warn_check_failed ("Re-entrant call to %s", _DBUS_FUNCTION_NAME);
       result = FALSE;
     }
   server->watches = watches;
@@ -1015,7 +1015,7 @@ dbus_server_set_timeout_functions (DBusServer                *server,
     }
   else
     {
-      _dbus_warn_check_failed ("Re-entrant call to %s\n", _DBUS_FUNCTION_NAME);
+      _dbus_warn_check_failed ("Re-entrant call to %s", _DBUS_FUNCTION_NAME);
       result = FALSE;
     }
   server->timeouts = timeouts;
@@ -1213,7 +1213,7 @@ _dbus_server_test (void)
       server = dbus_server_listen (valid_addresses[i], &error);
       if (server == NULL)
         {
-          _dbus_warn ("server listen error: %s: %s\n", error.name, error.message);
+          _dbus_warn ("server listen error: %s: %s", error.name, error.message);
           dbus_error_free (&error);
           _dbus_assert_not_reached ("Failed to listen for valid address.");
         }
@@ -1225,7 +1225,7 @@ _dbus_server_test (void)
 
       if (strstr (address, id) == NULL)
         {
-          _dbus_warn ("server id '%s' is not in the server address '%s'\n",
+          _dbus_warn ("server id '%s' is not in the server address '%s'",
                       id, address);
           _dbus_assert_not_reached ("bad server id or address");
         }
index 1791bd0..343b5d4 100644 (file)
@@ -535,7 +535,7 @@ check_sha_binary (const unsigned char *input,
 
   if (!_dbus_string_equal (&expected_str, &results))
     {
-      _dbus_warn ("Expected hash %s got %s for SHA-1 sum\n",
+      _dbus_warn ("Expected hash %s got %s for SHA-1 sum",
                   expected,
                   _dbus_string_get_const_data (&results));
       _dbus_string_free (&results);
index aedc26d..5bd8d5a 100644 (file)
@@ -171,15 +171,15 @@ socket_set_epoll_add (DBusSocketSet  *set,
         break;
 
       case EBADF:
-        _dbus_warn ("Bad fd %d\n", fd);
+        _dbus_warn ("Bad fd %d", fd);
         break;
 
       case EEXIST:
-        _dbus_warn ("fd %d added and then added again\n", fd);
+        _dbus_warn ("fd %d added and then added again", fd);
         break;
 
       default:
-        _dbus_warn ("Misc error when trying to watch fd %d: %s\n", fd,
+        _dbus_warn ("Misc error when trying to watch fd %d: %s", fd,
                     strerror (err));
         break;
     }
@@ -209,19 +209,19 @@ socket_set_epoll_enable (DBusSocketSet  *set,
   switch (err)
     {
       case EBADF:
-        _dbus_warn ("Bad fd %d\n", fd);
+        _dbus_warn ("Bad fd %d", fd);
         break;
 
       case ENOENT:
-        _dbus_warn ("fd %d enabled before it was added\n", fd);
+        _dbus_warn ("fd %d enabled before it was added", fd);
         break;
 
       case ENOMEM:
-        _dbus_warn ("Insufficient memory to change watch for fd %d\n", fd);
+        _dbus_warn ("Insufficient memory to change watch for fd %d", fd);
         break;
 
       default:
-        _dbus_warn ("Misc error when trying to watch fd %d: %s\n", fd,
+        _dbus_warn ("Misc error when trying to watch fd %d: %s", fd,
                     strerror (err));
         break;
     }
@@ -258,7 +258,7 @@ socket_set_epoll_disable (DBusSocketSet  *set,
     return;
 
   err = errno;
-  _dbus_warn ("Error when trying to watch fd %d: %s\n", fd,
+  _dbus_warn ("Error when trying to watch fd %d: %s", fd,
               strerror (err));
 }
 
@@ -276,7 +276,7 @@ socket_set_epoll_remove (DBusSocketSet  *set,
     return;
 
   err = errno;
-  _dbus_warn ("Error when trying to remove fd %d: %s\n", fd, strerror (err));
+  _dbus_warn ("Error when trying to remove fd %d: %s", fd, strerror (err));
 }
 
 /* Optimally, this should be the same as in DBusLoop: we use it to translate
index 01a2625..5cb2cf4 100644 (file)
@@ -76,14 +76,14 @@ check_spawn_nonexistent (void *data)
 
   if (!dbus_error_is_set (&error))
     {
-      _dbus_warn ("Did not get an error launching nonexistent executable\n");
+      _dbus_warn ("Did not get an error launching nonexistent executable");
       return FALSE;
     }
 
   if (!(dbus_error_has_name (&error, DBUS_ERROR_NO_MEMORY) ||
         dbus_error_has_name (&error, DBUS_ERROR_SPAWN_EXEC_FAILED)))
     {
-      _dbus_warn ("Not expecting error when launching nonexistent executable: %s: %s\n",
+      _dbus_warn ("Not expecting error when launching nonexistent executable: %s: %s",
                   error.name, error.message);
       dbus_error_free (&error);
       return FALSE;
@@ -127,7 +127,7 @@ check_spawn_segfault (void *data)
 
   if (!dbus_error_is_set (&error))
     {
-      _dbus_warn ("Did not get an error launching segfaulting binary\n");
+      _dbus_warn ("Did not get an error launching segfaulting binary");
       return FALSE;
     }
 
@@ -138,7 +138,7 @@ check_spawn_segfault (void *data)
         dbus_error_has_name (&error, DBUS_ERROR_SPAWN_CHILD_SIGNALED)))
 #endif
     {
-      _dbus_warn ("Not expecting error when launching segfaulting executable: %s: %s\n",
+      _dbus_warn ("Not expecting error when launching segfaulting executable: %s: %s",
                   error.name, error.message);
       dbus_error_free (&error);
       return FALSE;
@@ -182,14 +182,14 @@ check_spawn_exit (void *data)
 
   if (!dbus_error_is_set (&error))
     {
-      _dbus_warn ("Did not get an error launching binary that exited with failure code\n");
+      _dbus_warn ("Did not get an error launching binary that exited with failure code");
       return FALSE;
     }
 
   if (!(dbus_error_has_name (&error, DBUS_ERROR_NO_MEMORY) ||
         dbus_error_has_name (&error, DBUS_ERROR_SPAWN_CHILD_EXITED)))
     {
-      _dbus_warn ("Not expecting error when launching exiting executable: %s: %s\n",
+      _dbus_warn ("Not expecting error when launching exiting executable: %s: %s",
                   error.name, error.message);
       dbus_error_free (&error);
       return FALSE;
@@ -236,7 +236,7 @@ check_spawn_and_kill (void *data)
 
   if (!dbus_error_is_set (&error))
     {
-      _dbus_warn ("Did not get an error after killing spawned binary\n");
+      _dbus_warn ("Did not get an error after killing spawned binary");
       return FALSE;
     }
 
@@ -247,7 +247,7 @@ check_spawn_and_kill (void *data)
         dbus_error_has_name (&error, DBUS_ERROR_SPAWN_CHILD_SIGNALED)))
 #endif
     {
-      _dbus_warn ("Not expecting error when killing executable: %s: %s\n",
+      _dbus_warn ("Not expecting error when killing executable: %s: %s",
                   error.name, error.message);
       dbus_error_free (&error);
       return FALSE;
index 70664cd..04245b4 100644 (file)
@@ -369,9 +369,9 @@ _dbus_babysitter_unref (DBusBabysitter *sitter)
           if (ret < 0)
             {
               if (errno == ECHILD)
-                _dbus_warn ("Babysitter process not available to be reaped; should not happen\n");
+                _dbus_warn ("Babysitter process not available to be reaped; should not happen");
               else
-                _dbus_warn ("Unexpected error %d in waitpid() for babysitter: %s\n",
+                _dbus_warn ("Unexpected error %d in waitpid() for babysitter: %s",
                             errno, _dbus_strerror (errno));
             }
           else
@@ -415,7 +415,7 @@ read_data (DBusBabysitter *sitter,
   switch (r)
     {
     case READ_STATUS_ERROR:
-      _dbus_warn ("Failed to read data from fd %d: %s\n", fd, error.message);
+      _dbus_warn ("Failed to read data from fd %d: %s", fd, error.message);
       dbus_error_free (&error);
       return r;
 
@@ -441,7 +441,7 @@ read_data (DBusBabysitter *sitter,
             switch (r)
               {
               case READ_STATUS_ERROR:
-                _dbus_warn ("Failed to read arg from fd %d: %s\n", fd, error.message);
+                _dbus_warn ("Failed to read arg from fd %d: %s", fd, error.message);
                 dbus_error_free (&error);
                 return r;
               case READ_STATUS_EOF:
@@ -501,7 +501,7 @@ read_data (DBusBabysitter *sitter,
             switch (r)
               {
               case READ_STATUS_ERROR:
-                _dbus_warn ("Failed to read PID from fd %d: %s\n", fd, error.message);
+                _dbus_warn ("Failed to read PID from fd %d: %s", fd, error.message);
                 dbus_error_free (&error);
                 return r;
               case READ_STATUS_EOF:
@@ -516,7 +516,7 @@ read_data (DBusBabysitter *sitter,
           }
           break;
         default:
-          _dbus_warn ("Unknown message received from babysitter process\n");
+          _dbus_warn ("Unknown message received from babysitter process");
           break;
         }
     }
@@ -960,7 +960,7 @@ do_write (int fd, const void *buf, size_t count)
         goto again;
       else
         {
-          _dbus_warn ("Failed to write data to pipe!\n");
+          _dbus_warn ("Failed to write data to pipe!");
           exit (1); /* give up, we suck */
         }
     }
@@ -1033,7 +1033,7 @@ do_exec (int                       child_err_report_fd,
       retval = fcntl (i, F_GETFD);
 
       if (retval != -1 && !(retval & FD_CLOEXEC))
-        _dbus_warn ("Fd %d did not have the close-on-exec flag set!\n", i);
+        _dbus_warn ("Fd %d did not have the close-on-exec flag set!", i);
     }
 #endif
 
@@ -1077,7 +1077,7 @@ check_babysit_events (pid_t grandchild_pid,
   else if (ret < 0)
     {
       /* This isn't supposed to happen. */
-      _dbus_warn ("unexpected waitpid() failure in check_babysit_events(): %s\n",
+      _dbus_warn ("unexpected waitpid() failure in check_babysit_events(): %s",
                   _dbus_strerror (errno));
       exit (1);
     }
@@ -1090,7 +1090,7 @@ check_babysit_events (pid_t grandchild_pid,
     }
   else
     {
-      _dbus_warn ("waitpid() reaped pid %d that we've never heard of\n",
+      _dbus_warn ("waitpid() reaped pid %d that we've never heard of",
                   (int) ret);
       exit (1);
     }
@@ -1138,7 +1138,7 @@ babysit (pid_t grandchild_pid,
    */
   if (pipe (sigchld_pipe) < 0)
     {
-      _dbus_warn ("Not enough file descriptors to create pipe in babysitter process\n");
+      _dbus_warn ("Not enough file descriptors to create pipe in babysitter process");
       exit (1);
     }
 
@@ -1164,7 +1164,7 @@ babysit (pid_t grandchild_pid,
       
       if (_dbus_poll (pfds, _DBUS_N_ELEMENTS (pfds), -1) < 0 && errno != EINTR)
         {
-          _dbus_warn ("_dbus_poll() error: %s\n", strerror (errno));
+          _dbus_warn ("_dbus_poll() error: %s", strerror (errno));
           exit (1);
         }
 
@@ -1379,7 +1379,7 @@ _dbus_spawn_async_with_babysitter (DBusBabysitter          **sitter_p,
           if (fd >= 0)
             {
               if (write (fd, "0", sizeof (char)) < 0)
-                _dbus_warn ("writing oom_score_adj error: %s\n", strerror (errno));
+                _dbus_warn ("writing oom_score_adj error: %s", strerror (errno));
               _dbus_close (fd, NULL);
             }
 #endif
index bc0b2c3..e1c14f9 100644 (file)
@@ -73,7 +73,7 @@ struct DBusCondVar {
 #define PTHREAD_CHECK(func_name, result_or_call) do {                                  \
     int tmp = (result_or_call);                                                        \
     if (tmp != 0) {                                                                    \
-      _dbus_warn_check_failed ("pthread function %s failed with %d %s in %s\n",        \
+      _dbus_warn_check_failed ("pthread function %s failed with %d %s in %s",          \
                                func_name, tmp, strerror(tmp), _DBUS_FUNCTION_NAME);    \
     }                                                                                  \
 } while (0)
index a207230..5d9062f 100644 (file)
@@ -1218,8 +1218,7 @@ _dbus_listen_unix_socket (const char     *path,
    * and continue, maybe it will be good enough.
    */
   if (!abstract && chmod (path, 0777) < 0)
-    _dbus_warn ("Could not set mode 0777 on socket %s\n",
-                path);
+    _dbus_warn ("Could not set mode 0777 on socket %s", path);
 
   return listen_fd;
 }
@@ -3400,7 +3399,7 @@ _dbus_socketpair (DBusSocket *fd1,
 
   return TRUE;
 #else
-  _dbus_warn ("_dbus_socketpair() not implemented on this OS\n");
+  _dbus_warn ("_dbus_socketpair() not implemented on this OS");
   dbus_set_error (error, DBUS_ERROR_FAILED,
                   "_dbus_socketpair() not implemented on this OS");
   return FALSE;
@@ -4205,7 +4204,7 @@ _dbus_append_keyring_directory_for_credentials (DBusString      *directory,
         static dbus_bool_t already_warned = FALSE;
         if (!already_warned)
           {
-            _dbus_warn ("Using your real home directory for testing, set DBUS_TEST_HOMEDIR to avoid\n");
+            _dbus_warn ("Using your real home directory for testing, set DBUS_TEST_HOMEDIR to avoid");
             already_warned = TRUE;
           }
       }
index 886c5b6..d9e8c4f 100644 (file)
@@ -345,7 +345,7 @@ _dbus_change_to_daemon_user  (const char    *user,
    * is going to work then setgroups() should also work.
    */
   if (setgroups (0, NULL) < 0)
-    _dbus_warn ("Failed to drop supplementary groups: %s\n",
+    _dbus_warn ("Failed to drop supplementary groups: %s",
                 _dbus_strerror (errno));
 
   /* Set GID first, or the setuid may remove our permission
index 6b361ef..f35c966 100644 (file)
@@ -97,7 +97,7 @@ check_dirname (const char *filename,
 
   if (!_dbus_string_equal_c_str (&d, dirname))
     {
-      _dbus_warn ("For filename \"%s\" got dirname \"%s\" and expected \"%s\"\n",
+      _dbus_warn ("For filename \"%s\" got dirname \"%s\" and expected \"%s\"",
                   filename,
                   _dbus_string_get_const_data (&d),
                   dirname);
@@ -117,7 +117,7 @@ check_path_absolute (const char *path,
 
   if (_dbus_path_is_absolute (&p) != expected)
     {
-      _dbus_warn ("For path \"%s\" expected absolute = %d got %d\n",
+      _dbus_warn ("For path \"%s\" expected absolute = %d got %d",
                   path, expected, _dbus_path_is_absolute (&p));
       exit (1);
     }
index a3f574f..88fde21 100644 (file)
@@ -2325,7 +2325,7 @@ _dbus_get_tmpdir(void)
 
       if (!GetTempPathA (sizeof (buf), buf))
         {
-          _dbus_warn ("GetTempPath failed\n");
+          _dbus_warn ("GetTempPath failed");
           _dbus_abort ();
         }
 
@@ -3343,7 +3343,7 @@ _dbus_append_keyring_directory_for_credentials (DBusString      *directory,
         static dbus_bool_t already_warned = FALSE;
         if (!already_warned)
           {
-            _dbus_warn ("Using your real home directory for testing, set DBUS_TEST_HOMEDIR to avoid\n");
+            _dbus_warn ("Using your real home directory for testing, set DBUS_TEST_HOMEDIR to avoid");
             already_warned = TRUE;
           }
       }
@@ -3565,7 +3565,7 @@ _dbus_win_warn_win_error (const char *message,
 
   dbus_error_init (&error);
   _dbus_win_set_error_from_win_error (&error, code);
-  _dbus_warn ("%s: %s\n", message, error.message);
+  _dbus_warn ("%s: %s", message, error.message);
   dbus_error_free (&error);
 }
 
index 5990d6e..c0c6856 100644 (file)
@@ -44,7 +44,7 @@ check_memleaks (void)
   printf ("%s: checking for memleaks\n", "test-dbus");
   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");
     }
index 86374b5..e9a7340 100644 (file)
@@ -899,7 +899,7 @@ _dbus_transport_handle_watch (DBusTransport           *transport,
 
   if (dbus_watch_get_socket (watch) < 0)
     {
-      _dbus_warn_check_failed ("Tried to handle an invalidated watch; this watch should have been removed\n");
+      _dbus_warn_check_failed ("Tried to handle an invalidated watch; this watch should have been removed");
       return TRUE;
     }
   
index 52f927a..5d386fa 100644 (file)
@@ -260,7 +260,7 @@ init_system_db (void)
           else
             {
               /* This really should not happen. */
-              _dbus_warn ("Could not get password database information for UID of current process: %s\n",
+              _dbus_warn ("Could not get password database information for UID of current process: %s",
                           error.message);
               dbus_error_free (&error);
               return FALSE;
index 093f193..3257f0e 100644 (file)
@@ -739,7 +739,7 @@ dbus_watch_handle (DBusWatch    *watch,
 #ifndef DBUS_DISABLE_CHECKS
   if (!_dbus_pollable_is_valid (watch->fd) || watch->flags == 0)
     {
-      _dbus_warn_check_failed ("Watch is invalid, it should have been removed\n");
+      _dbus_warn_check_failed ("Watch is invalid, it should have been removed");
       return TRUE;
     }
 #endif