]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix compiler warnings.
authorWerner Lemberg <wl@gnu.org>
Sun, 26 Dec 2010 09:53:59 +0000 (10:53 +0100)
committerWerner Lemberg <wl@gnu.org>
Sun, 26 Dec 2010 09:53:59 +0000 (10:53 +0100)
lily/beaming-pattern.cc
lily/break-substitution.cc
lily/duration.cc
lily/figured-bass-engraver.cc
lily/font-metric.cc
lily/lily-guile.cc
lily/lookup.cc
lily/midi-item.cc
lily/pango-font.cc
lily/pitch.cc

index 7567caa700744a3b72dd23b479d230ecd7ca57ac..d58424cb5a2f989d5334e65cdf0ea1ff1387db44 100644 (file)
@@ -189,7 +189,7 @@ Beaming_pattern::find_rhythmic_importance (Beaming_options const &options)
              // in an 8th-note triplet with a quarter-note beat, 1/3 of a beat should be
              // more important than 1/2.
              if (infos_[i].rhythmic_importance_ >= 0)
-               infos_[i].rhythmic_importance_ = (dt / options.base_moment_).den ();
+               infos_[i].rhythmic_importance_ = (int) (dt / options.base_moment_).den ();
 
              i++;
            }
index cbc88255f33aac0af32b6b89f0e20ec2053ffaf5..3d89f18710749d445c3b13aa84dd2f13191ee867 100644 (file)
@@ -295,8 +295,8 @@ struct Substitution_entry
       }
     else
       {
-       left_ = sr[LEFT];
-       right_ = sr[RIGHT];
+       left_ = (short) sr[LEFT];
+       right_ = (short) sr[RIGHT];
       }
   }
   Substitution_entry ()
index 814bf6e159db3ee1b8d37444dc69e3fdb5f31232..627ede23da764e43d1f507531ab31f07d4d4dd0b 100644 (file)
@@ -61,8 +61,8 @@ Duration::Duration (Rational r, bool scale)
         satisfies the left inequality and is within a factor of 2 of
         satistying the right one. Therefore either k = k' or k = k'+1 */
 
-      int p = r.num ();
-      int q = r.den ();
+      int p = (int) r.num ();
+      int q = (int) r.den ();
       int k = intlog2 (q) - intlog2 (p);
       if (shift_left(p, k) < q)
        k++;
index b4c92f8862060ac3c8270f9b76672b3f6f107c20..711537ec413967e2db56c2ea4cb87d36877991b3 100644 (file)
@@ -182,7 +182,7 @@ Figured_bass_engraver::stop_translation_timestep ()
 
 IMPLEMENT_TRANSLATOR_LISTENER (Figured_bass_engraver, rest);
 void
-Figured_bass_engraver::listen_rest (Stream_event *ev)
+Figured_bass_engraver::listen_rest (Stream_event *)
 {
   have_rest_ = true;
 }
index b2ff830696a315cd36e5bc1bd8fc25e6a7bcc998..28bf90a0b671d23100337a91f8c625ff5179aa3c 100644 (file)
@@ -79,7 +79,7 @@ Font_metric::count () const
 }
 
 Box
-Font_metric::get_indexed_char_dimensions (size_t k) const
+Font_metric::get_indexed_char_dimensions (size_t) const
 {
   return Box (Interval (0, 0), Interval (0, 0));
 }
index fea8836250486100480bb20aa99adf45f07f40ab..95610af236c505ebd58f806797a22f68fa8561ba 100644 (file)
@@ -661,7 +661,7 @@ SCM
 parse_symbol_list (char const *symbols)
 {
   while (isspace (*symbols))
-    *symbols++;
+    symbols++;
   string s = symbols;
   replace_all (&s, '\n', ' ');
   replace_all (&s, '\t', ' ');
index 207dd06bf444e242740ae7dc5ac11cada8afad2d..6457c0caa5ef968c5fd807ec259d4a695c1197ee 100644 (file)
@@ -401,7 +401,7 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick,
               Bezier back_dash, curve_dash;
               Real seg_length = (back_segment.control_[3] - 
                                  back_segment.control_[0]).length ();
-              int pattern_count = seg_length / dash_period;
+              int pattern_count = (int) (seg_length / dash_period);
               Real pattern_length = 1.0 / (pattern_count + dash_fraction);
               Real start_t, end_t;
               for (int p = 0; p <= pattern_count; p++)
index 263c978d07dbc2eba440f0d2e9119842b0f0311b..547b67a5f0e3c0a11f5655cd32be8ae83568ce30 100644 (file)
@@ -87,7 +87,7 @@ Midi_instrument::to_string () const
   SCM program = scm_call_1 (proc, ly_symbol2scm (audio_->str_.c_str ()));
   found = (program != SCM_BOOL_F);
   if (found)
-    program_byte = scm_to_int (program);
+    program_byte = (Byte) scm_to_int (program);
   else
     warning (_f ("no such MIDI instrument: `%s'", audio_->str_.c_str ()));
 
index 21ab85ab667052697d8038e1aea8a59f5f792f14..480dd8c465d77563a7eb8f7e60e292ffa4740f84 100644 (file)
@@ -300,7 +300,7 @@ Pango_font::physical_font_tab () const
 extern bool music_strings_to_paths;
 
 Stencil
-Pango_font::text_stencil (Output_def *state,
+Pango_font::text_stencil (Output_def * /* state */,
                          string str, bool music_string) const
 {
   /*
index e9872fdf8eb09ba8e9bb534b52644583b7ef2744..e9dd522351d202a809d6235ab6f415e138be3c1a 100644 (file)
@@ -56,7 +56,7 @@ Pitch::compare (Pitch const &m1, Pitch const &m2)
   if (n)
     return n;
   if (a)
-    return a;
+    return a > (Rational)0;
   
   return 0;
 }