]> git.donarmstrong.com Git - lilypond.git/commitdiff
*** empty log message ***
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 18 Oct 2006 22:42:22 +0000 (22:42 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 18 Oct 2006 22:42:22 +0000 (22:42 +0000)
ChangeLog
flower/file-cookie.cc
flower/string-convert.cc

index 74add938523617ccdce0a17421118fb0e2ab8af7..be1aae5b67a91b0e3106cf1440b0e7a9e169bb1f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2006-10-19  Han-Wen Nienhuys  <hanwen@lilypond.org>
 
+       * flower/string-convert.cc (dec2double): clean-up warnings. 
+
        * configure.in (CXXFLAGS): add -Werror.
 
        * VERSION (PACKAGE_NAME): release 2.9.25
index 8f4c9c4f85be8372c6407808090d7c38bc54a6f1..49b5518f362264b6740476336b55ca6036a2eba3 100644 (file)
@@ -7,7 +7,7 @@ using namespace std;
 
 extern "C" {
 
-  static bool
+  bool
   is_memory_stream (void *foo)
   {
     Memory_out_stream *cookie = (Memory_out_stream *) foo;
index f9449363f04eacea19d94f88ddda8855af5d9400..43f0389bde87d399de8fbff41d7428e53583b093 100644 (file)
@@ -74,9 +74,9 @@ String_convert::dec2int (string dec_string)
     return 0;
 
   long l = 0;
-  int conv = sscanf (dec_string.c_str (), "%ld", &l);
-  assert (conv);
-
+  if (!sscanf (dec_string.c_str (), "%ld", &l))
+    assert (false);
+  
   return (int)l;
 }
 
@@ -94,9 +94,11 @@ String_convert::dec2double (string dec_string)
 {
   if (!dec_string.length ())
     return 0;
-  double d = 0;
-  int conv = sscanf (dec_string.c_str (), "%lf", &d);
-  assert (conv);
+  
+  double d = 0.0;
+  if (!sscanf (dec_string.c_str (), "%lf", &d))
+    assert (false);
+  
   return d;
 }
 
@@ -125,10 +127,10 @@ string
 String_convert::hex2bin (string hex_string)
 {
   string str;
-  //  silly, asserts should alway be "on"!
-  //    assert (!hex2bin (hex_string, str) );
-  int error_i = hex2bin (hex_string, str);
-  assert (!error_i);
+
+  if (hex2bin (hex_string, str))
+    assert (false);
+  
   return str;
 }