You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2006/08/02 21:16:46 UTC

svn commit: r428096 - /incubator/stdcxx/trunk/util/util.cpp

Author: sebor
Date: Wed Aug  2 12:16:46 2006
New Revision: 428096

URL: http://svn.apache.org/viewvc?rev=428096&view=rev
Log:
2006-08-01 Andrew Black <ab...@roguewave.com>

	* util.cpp (warn, terminate): Handle case of null target_name.

Modified:
    incubator/stdcxx/trunk/util/util.cpp

Modified: incubator/stdcxx/trunk/util/util.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/util.cpp?rev=428096&r1=428095&r2=428096&view=diff
==============================================================================
--- incubator/stdcxx/trunk/util/util.cpp (original)
+++ incubator/stdcxx/trunk/util/util.cpp Wed Aug  2 12:16:46 2006
@@ -39,7 +39,10 @@
 
     assert (0 != format);
 
-    fprintf (stderr, "%s (%s): ", exe_name, target_name);
+    if (target_name)
+        fprintf (stderr, "%s (%s): ", exe_name, target_name);
+    else
+        fprintf (stderr, "%s: ", exe_name);
 
     va_start (args, format);
     vfprintf (stderr, format, args);
@@ -60,7 +63,10 @@
     assert (0 != format);
     assert (0 != state);
 
-    fprintf (stderr, "%s (%s): ", exe_name, target_name);
+    if (target_name)
+        fprintf (stderr, "%s (%s): ", exe_name, target_name);
+    else
+        fprintf (stderr, "%s: ", exe_name);
 
     va_start (args, format);
     vfprintf (stderr, format, args);