summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2008-12-27 09:23:23 +0100
committerWerner Lemberg <wl@gnu.org>2008-12-27 09:23:23 +0100
commit750a3ffcf9186636a0477358620bec74d12a7212 (patch)
treea968dcdcf7135941154019cbbf431eaa1f522ecd
parent5b3759c33c91766c98a939f3aa9ced6568e2bc69 (diff)
More C++.
-rw-r--r--flower/file-cookie.cc8
-rw-r--r--flower/memory-stream.cc16
-rw-r--r--lily/accidental-engraver.cc8
-rw-r--r--lily/auto-beam-engraver.cc9
-rw-r--r--lily/beam.cc4
-rw-r--r--lily/box.cc6
-rw-r--r--lily/context.cc3
-rw-r--r--lily/custos-engraver.cc3
-rw-r--r--lily/engraver.cc18
-rw-r--r--lily/figured-bass-position-engraver.cc3
-rw-r--r--lily/fingering-engraver.cc3
-rw-r--r--lily/font-metric.cc3
-rw-r--r--lily/general-scheme.cc7
-rw-r--r--lily/key-engraver.cc6
-rw-r--r--lily/ly-module.cc12
-rw-r--r--lily/lyric-combine-music-iterator.cc4
-rw-r--r--lily/melody-engraver.cc3
-rw-r--r--lily/minimal-page-breaking.cc3
-rw-r--r--lily/module-scheme.cc6
-rw-r--r--lily/new-fingering-engraver.cc4
-rw-r--r--lily/optimal-page-breaking.cc3
-rw-r--r--lily/output-def.cc2
-rw-r--r--lily/pango-font.cc4
-rw-r--r--lily/paper-outputter.cc5
-rw-r--r--lily/prob.cc5
-rw-r--r--lily/relative-octave-music.cc4
-rw-r--r--lily/rest.cc7
-rw-r--r--lily/scale.cc10
-rw-r--r--lily/scm-hash.cc6
-rw-r--r--lily/spacing-basic.cc6
-rw-r--r--lily/spring-smob.cc4
-rw-r--r--lily/stem.cc7
-rw-r--r--lily/translator-dispatch-list.cc8
33 files changed, 87 insertions, 113 deletions
diff --git a/flower/file-cookie.cc b/flower/file-cookie.cc
index 49b5518f36..bedb100a00 100644
--- a/flower/file-cookie.cc
+++ b/flower/file-cookie.cc
@@ -15,12 +15,10 @@ extern "C" {
}
void *
- lily_fopencookie (void *cookie, char const *modes,
- lily_cookie_io_functions_t io_funcs)
+ lily_fopencookie (void *cookie,
+ char const * /* modes */,
+ lily_cookie_io_functions_t /* io_funcs */)
{
- (void) cookie;
- (void) modes;
- (void) io_funcs;
assert (is_memory_stream (cookie));
return (FILE *) cookie;
}
diff --git a/flower/memory-stream.cc b/flower/memory-stream.cc
index 270438dcae..dbf6fd83f2 100644
--- a/flower/memory-stream.cc
+++ b/flower/memory-stream.cc
@@ -102,23 +102,19 @@ Memory_out_stream::writer (void *cookie,
}
ssize_t
-Memory_out_stream::reader (void *cookie,
- char *buffer,
- size_t size)
+Memory_out_stream::reader (void * /* cookie */,
+ char * /* buffer */,
+ size_t /* size */)
{
- (void) cookie;
- (void) buffer;
- (void) size;
-
assert (false);
return 0;
}
int
-Memory_out_stream::seeker (void *, off64_t *, int whence)
+Memory_out_stream::seeker (void *,
+ off64_t *,
+ int)
{
- (void) whence;
-
assert (false);
return 0;
}
diff --git a/lily/accidental-engraver.cc b/lily/accidental-engraver.cc
index 457fd734c4..7fcea1ccfe 100644
--- a/lily/accidental-engraver.cc
+++ b/lily/accidental-engraver.cc
@@ -411,13 +411,11 @@ Accidental_engraver::create_accidental (Accidental_entry *entry,
}
Grob *
-Accidental_engraver::make_standard_accidental (Stream_event *note,
+Accidental_engraver::make_standard_accidental (Stream_event * /* note */,
Grob *note_head,
Engraver *trans,
bool cautionary)
{
- (void)note;
-
/*
We construct the accidentals at the originating Voice
level, so that we get the property settings for
@@ -455,12 +453,10 @@ Accidental_engraver::make_standard_accidental (Stream_event *note,
}
Grob *
-Accidental_engraver::make_suggested_accidental (Stream_event *note,
+Accidental_engraver::make_suggested_accidental (Stream_event * /* note */,
Grob *note_head,
Engraver *trans)
{
- (void) note;
-
Grob *a = trans->make_item ("AccidentalSuggestion", note_head->self_scm ());
Side_position_interface::add_support (a, note_head);
diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc
index f86edaecc8..af4f1fc2d9 100644
--- a/lily/auto-beam-engraver.cc
+++ b/lily/auto-beam-engraver.cc
@@ -302,27 +302,24 @@ Auto_beam_engraver::finalize ()
void
-Auto_beam_engraver::acknowledge_beam (Grob_info info)
+Auto_beam_engraver::acknowledge_beam (Grob_info /* info */)
{
- (void)info;
check_bar_property ();
if (stems_)
end_beam ();
}
void
-Auto_beam_engraver::acknowledge_bar_line (Grob_info info)
+Auto_beam_engraver::acknowledge_bar_line (Grob_info /* info */)
{
- (void)info;
check_bar_property ();
if (stems_)
end_beam ();
}
void
-Auto_beam_engraver::acknowledge_rest (Grob_info info)
+Auto_beam_engraver::acknowledge_rest (Grob_info /* info */)
{
- (void)info;
check_bar_property ();
if (stems_)
end_beam ();
diff --git a/lily/beam.cc b/lily/beam.cc
index c8adf5694d..dcca553227 100644
--- a/lily/beam.cc
+++ b/lily/beam.cc
@@ -893,10 +893,8 @@ Beam::no_visible_stem_positions (Grob *me, Interval default_value)
*/
MAKE_SCHEME_CALLBACK (Beam, calc_least_squares_positions, 2);
SCM
-Beam::calc_least_squares_positions (SCM smob, SCM posns)
+Beam::calc_least_squares_positions (SCM smob, SCM /* posns */)
{
- (void) posns;
-
Grob *me = unsmob_grob (smob);
int count = normal_stem_count (me);
diff --git a/lily/box.cc b/lily/box.cc
index 5cce139fd4..5c2af4d317 100644
--- a/lily/box.cc
+++ b/lily/box.cc
@@ -88,16 +88,14 @@ IMPLEMENT_TYPE_P (Box, "ly:box?");
IMPLEMENT_DEFAULT_EQUAL_P (Box);
SCM
-Box::mark_smob (SCM x)
+Box::mark_smob (SCM /* x */)
{
- (void)x;
return SCM_EOL;
}
int
-Box::print_smob (SCM x, SCM p, scm_print_state*)
+Box::print_smob (SCM /* x */, SCM p, scm_print_state*)
{
- (void)x;
scm_puts ("#<Box>", p);
return 1;
}
diff --git a/lily/context.cc b/lily/context.cc
index 36e506cd7e..a1456a1bbf 100644
--- a/lily/context.cc
+++ b/lily/context.cc
@@ -46,9 +46,8 @@ Context::check_removal ()
}
}
-Context::Context (Context const &src)
+Context::Context (Context const & /* src */)
{
- (void) src;
assert (false);
}
diff --git a/lily/custos-engraver.cc b/lily/custos-engraver.cc
index 8b5eb08ef8..578f57266e 100644
--- a/lily/custos-engraver.cc
+++ b/lily/custos-engraver.cc
@@ -65,9 +65,8 @@ Custos_engraver::start_translation_timestep ()
}
void
-Custos_engraver::acknowledge_bar (Grob_info info)
+Custos_engraver::acknowledge_bar (Grob_info /* info */)
{
- (void) info;
custos_permitted_ = true;
}
diff --git a/lily/engraver.cc b/lily/engraver.cc
index dcda3031b4..9ac54f804e 100644
--- a/lily/engraver.cc
+++ b/lily/engraver.cc
@@ -106,13 +106,19 @@ LY_DEFINE (ly_set_grob_creation_callback, "ly:set-grob-creation-callback",
#endif
Grob *
-Engraver::internal_make_grob (SCM symbol, SCM cause, char const *name, char const *file, int line, char const *fun)
+Engraver::internal_make_grob (SCM symbol,
+ SCM cause,
+ char const * /* name */,
+ char const *file,
+ int line,
+ char const *fun)
{
- (void) file;
- (void) fun;
- (void) line;
- (void) name;
-
+#ifdef NDEBUG
+ (void)file;
+ (void)line;
+ (void)fun;
+#endif
+
SCM props = updated_grob_properties (context (), symbol);
Grob *grob = 0;
diff --git a/lily/figured-bass-position-engraver.cc b/lily/figured-bass-position-engraver.cc
index fadb5f1cb3..15d1278fbd 100644
--- a/lily/figured-bass-position-engraver.cc
+++ b/lily/figured-bass-position-engraver.cc
@@ -115,9 +115,8 @@ Figured_bass_position_engraver::stop_translation_timestep ()
}
void
-Figured_bass_position_engraver::acknowledge_end_bass_figure_alignment (Grob_info info)
+Figured_bass_position_engraver::acknowledge_end_bass_figure_alignment (Grob_info /* info */)
{
- (void)info;
stop_spanner ();
}
diff --git a/lily/fingering-engraver.cc b/lily/fingering-engraver.cc
index 1c4107e686..b48f38924f 100644
--- a/lily/fingering-engraver.cc
+++ b/lily/fingering-engraver.cc
@@ -45,14 +45,13 @@ Fingering_engraver::listen_fingering (Stream_event *ev)
IMPLEMENT_TRANSLATOR_LISTENER (Fingering_engraver, stroke_finger);
void
-Fingering_engraver::listen_stroke_finger (Stream_event *ev)
+Fingering_engraver::listen_stroke_finger (Stream_event * /* ev */)
{
/*
FIXME: should do something.
This function is mainly here to shut up a warning
*/
- (void)ev;
}
void
diff --git a/lily/font-metric.cc b/lily/font-metric.cc
index 9901f4c382..d9ccecbc91 100644
--- a/lily/font-metric.cc
+++ b/lily/font-metric.cc
@@ -185,9 +185,8 @@ Font_metric::word_stencil (string str) const
}
Stencil
-Font_metric::text_stencil (string str) const
+Font_metric::text_stencil (string /* str */) const
{
- (void) str;
programming_error("Cannot get a text stencil from this font");
return Stencil (Box (), SCM_EOL);
}
diff --git a/lily/general-scheme.cc b/lily/general-scheme.cc
index 3e1052aed3..94c05ee607 100644
--- a/lily/general-scheme.cc
+++ b/lily/general-scheme.cc
@@ -345,10 +345,11 @@ LY_DEFINE (ly_stderr_redirect, "ly:stderr-redirect",
}
static SCM
-accumulate_symbol (void *closure, SCM key, SCM val, SCM result)
+accumulate_symbol (void * /* closure */,
+ SCM key,
+ SCM /* val */,
+ SCM result)
{
- (void) closure;
- (void) val;
return scm_cons (key, result);
}
diff --git a/lily/key-engraver.cc b/lily/key-engraver.cc
index 7997d11c33..45300af686 100644
--- a/lily/key-engraver.cc
+++ b/lily/key-engraver.cc
@@ -119,18 +119,16 @@ Key_engraver::listen_key_change (Stream_event *ev)
}
void
-Key_engraver::acknowledge_clef (Grob_info info)
+Key_engraver::acknowledge_clef (Grob_info /* info */)
{
- (void)info;
SCM c = get_property ("createKeyOnClefChange");
if (to_boolean (c))
create_key (false);
}
void
-Key_engraver::acknowledge_bar_line (Grob_info info)
+Key_engraver::acknowledge_bar_line (Grob_info /* info */)
{
- (void)info;
if (scm_is_pair (get_property ("keySignature")))
create_key (true);
}
diff --git a/lily/ly-module.cc b/lily/ly-module.cc
index 4d6b0a8f97..eb73cd68cd 100644
--- a/lily/ly-module.cc
+++ b/lily/ly-module.cc
@@ -97,9 +97,11 @@ ly_module_symbols (SCM mod)
}
static SCM
-entry_to_alist (void *closure, SCM key, SCM val, SCM result)
+entry_to_alist (void * /* closure */,
+ SCM key,
+ SCM val,
+ SCM result)
{
- (void) closure;
if (scm_variable_bound_p (val) == SCM_BOOL_T)
return scm_cons (scm_cons (key, scm_variable_ref (val)), result);
programming_error ("unbound variable in module");
@@ -134,9 +136,11 @@ ly_reexport_module (SCM mod)
#ifdef MODULE_GC_KLUDGE
static SCM
-redefine_keyval (void *closure, SCM key, SCM val, SCM result)
+redefine_keyval (void * /* closure */,
+ SCM key,
+ SCM val,
+ SCM result)
{
- (void)closure;
SCM new_tab = result;
scm_hashq_set_x (new_tab, key, val);
return new_tab;
diff --git a/lily/lyric-combine-music-iterator.cc b/lily/lyric-combine-music-iterator.cc
index 26a4dfa587..b75d309f2a 100644
--- a/lily/lyric-combine-music-iterator.cc
+++ b/lily/lyric-combine-music-iterator.cc
@@ -260,10 +260,8 @@ Lyric_combine_music_iterator::find_voice ()
}
void
-Lyric_combine_music_iterator::process (Moment when)
+Lyric_combine_music_iterator::process (Moment /* when */)
{
- (void) when;
-
/* see if associatedVoice has been changed */
Context *new_voice = find_voice ();
if (new_voice)
diff --git a/lily/melody-engraver.cc b/lily/melody-engraver.cc
index 5189f674b5..9957185f04 100644
--- a/lily/melody-engraver.cc
+++ b/lily/melody-engraver.cc
@@ -62,9 +62,8 @@ Melody_engraver::stop_translation_timestep ()
void
-Melody_engraver::acknowledge_slur (Grob_info info)
+Melody_engraver::acknowledge_slur (Grob_info /* info */)
{
- (void)info;
melody_item_ = 0;
}
diff --git a/lily/minimal-page-breaking.cc b/lily/minimal-page-breaking.cc
index 1b5fce910d..f26b4b5886 100644
--- a/lily/minimal-page-breaking.cc
+++ b/lily/minimal-page-breaking.cc
@@ -15,9 +15,8 @@
#include "paper-book.hh"
static bool
-is_break (Grob *g)
+is_break (Grob *)
{
- (void) g; /* shutup warning */
return false;
}
diff --git a/lily/module-scheme.cc b/lily/module-scheme.cc
index 173226ac15..627504d922 100644
--- a/lily/module-scheme.cc
+++ b/lily/module-scheme.cc
@@ -19,9 +19,11 @@
*/
static SCM
-module_define_closure_func (void *closure, SCM key, SCM val, SCM result)
+module_define_closure_func (void *closure,
+ SCM key,
+ SCM val,
+ SCM /* result */)
{
- (void) result;
SCM module = (SCM) closure;
if (scm_variable_bound_p (val) == SCM_BOOL_T)
scm_module_define (module, key, scm_variable_ref (val));
diff --git a/lily/new-fingering-engraver.cc b/lily/new-fingering-engraver.cc
index 5078e2d2db..cd9532206d 100644
--- a/lily/new-fingering-engraver.cc
+++ b/lily/new-fingering-engraver.cc
@@ -125,10 +125,8 @@ New_fingering_engraver::acknowledge_stem (Grob_info inf)
void
New_fingering_engraver::add_script (Grob *head,
Stream_event *event,
- Stream_event *note)
+ Stream_event * /* note */)
{
- (void) note;
-
Finger_tuple ft;
Grob *g = make_item ("Script", event->self_scm ());
diff --git a/lily/optimal-page-breaking.cc b/lily/optimal-page-breaking.cc
index f495ab7fa6..c5a6133563 100644
--- a/lily/optimal-page-breaking.cc
+++ b/lily/optimal-page-breaking.cc
@@ -18,9 +18,8 @@
#include "system.hh"
static bool
-is_break (Grob *g)
+is_break (Grob *)
{
- (void) g; /* shutup warning */
return false;
}
diff --git a/lily/output-def.cc b/lily/output-def.cc
index 1fcc5f596e..212731bd5f 100644
--- a/lily/output-def.cc
+++ b/lily/output-def.cc
@@ -92,8 +92,6 @@ Output_def::print_smob (SCM s, SCM p, scm_print_state *)
Output_def * def = unsmob_output_def (s);
scm_puts ("#< ", p);
scm_puts (def->class_name (), p);
-
- (void)def;
scm_puts (">", p);
return 1;
}
diff --git a/lily/pango-font.cc b/lily/pango-font.cc
index 611a5db555..138fd5cb00 100644
--- a/lily/pango-font.cc
+++ b/lily/pango-font.cc
@@ -29,12 +29,10 @@
#if HAVE_PANGO_FT2
#include "stencil.hh"
-Pango_font::Pango_font (PangoFT2FontMap *fontmap,
+Pango_font::Pango_font (PangoFT2FontMap * /* fontmap */,
PangoFontDescription const *description,
Real output_scale)
{
- (void) fontmap;
-
physical_font_tab_ = scm_c_make_hash_table (11);
PangoDirection pango_dir = PANGO_DIRECTION_LTR;
context_ = pango_ft2_get_context (PANGO_RESOLUTION,
diff --git a/lily/paper-outputter.cc b/lily/paper-outputter.cc
index 5f02a76549..d3b99055e9 100644
--- a/lily/paper-outputter.cc
+++ b/lily/paper-outputter.cc
@@ -55,9 +55,10 @@ Paper_outputter::mark_smob (SCM x)
}
int
-Paper_outputter::print_smob (SCM x, SCM p, scm_print_state*)
+Paper_outputter::print_smob (SCM /* x */,
+ SCM p,
+ scm_print_state *)
{
- (void) x;
scm_puts ("#<Paper_outputter>", p);
return 1;
}
diff --git a/lily/prob.cc b/lily/prob.cc
index e55e84afc1..9d75d744f3 100644
--- a/lily/prob.cc
+++ b/lily/prob.cc
@@ -174,10 +174,9 @@ Prob::internal_set_property (SCM sym, SCM val)
}
void
-Prob::type_check_assignment (SCM sym, SCM val) const
+Prob::type_check_assignment (SCM, SCM) const
{
- (void) sym;
- (void) val;
+ /* empty */
}
SCM
diff --git a/lily/relative-octave-music.cc b/lily/relative-octave-music.cc
index bf6116ab17..8d677c425b 100644
--- a/lily/relative-octave-music.cc
+++ b/lily/relative-octave-music.cc
@@ -19,9 +19,9 @@ public:
MAKE_SCHEME_CALLBACK (Relative_octave_music, no_relative_callback, 2)
SCM
-Relative_octave_music::no_relative_callback (SCM music, SCM pitch)
+Relative_octave_music::no_relative_callback (SCM /* music */,
+ SCM pitch)
{
- (void)music;
return pitch;
}
diff --git a/lily/rest.cc b/lily/rest.cc
index da13f6cdbc..9caae1f5e9 100644
--- a/lily/rest.cc
+++ b/lily/rest.cc
@@ -193,11 +193,10 @@ Rest::generic_extent_callback (Grob *me, Axis a)
MAKE_SCHEME_CALLBACK (Rest, pure_height, 3);
SCM
-Rest::pure_height (SCM smob, SCM start, SCM end)
+Rest::pure_height (SCM smob,
+ SCM /* start */,
+ SCM /* end */)
{
- (void) start;
- (void) end;
-
Grob *me = unsmob_grob (smob);
SCM m = brew_internal_stencil (me, false);
return ly_interval2scm (unsmob_stencil (m)->extent (Y_AXIS));
diff --git a/lily/scale.cc b/lily/scale.cc
index 9e39d8a99e..23490c8890 100644
--- a/lily/scale.cc
+++ b/lily/scale.cc
@@ -121,19 +121,17 @@ Scale::normalize_step (int step) const
}
int
-Scale::print_smob (SCM x, SCM port, scm_print_state *)
+Scale::print_smob (SCM /* x */,
+ SCM port,
+ scm_print_state *)
{
- (void) x;
-
scm_puts ("#<Scale>", port);
return 1;
}
-
SCM
-Scale::mark_smob (SCM x)
+Scale::mark_smob (SCM)
{
- (void) x;
return SCM_UNSPECIFIED;
}
diff --git a/lily/scm-hash.cc b/lily/scm-hash.cc
index ed3345b5ac..d3a8d7f9bd 100644
--- a/lily/scm-hash.cc
+++ b/lily/scm-hash.cc
@@ -120,9 +120,11 @@ Scheme_hash_table::remove (SCM k)
}
static SCM
-collect_handles (void *closure, SCM key, SCM value, SCM result)
+collect_handles (void * /* closure */,
+ SCM key,
+ SCM value,
+ SCM result)
{
- (void) closure;
return scm_acons(key, value, result);
}
diff --git a/lily/spacing-basic.cc b/lily/spacing-basic.cc
index 7545ec4e5b..40e0a16b4a 100644
--- a/lily/spacing-basic.cc
+++ b/lily/spacing-basic.cc
@@ -83,11 +83,11 @@ get_measure_length (Grob *column)
}
Real
-Spacing_spanner::note_spacing (Grob *me, Grob *lc, Grob *rc,
+Spacing_spanner::note_spacing (Grob * /* me */,
+ Grob *lc,
+ Grob *rc,
Spacing_options const *options)
{
- (void) me;
-
Moment shortest_playing_len = 0;
SCM s = lc->get_property ("shortest-playing-duration");
diff --git a/lily/spring-smob.cc b/lily/spring-smob.cc
index ae4533cc21..a50c4bf92f 100644
--- a/lily/spring-smob.cc
+++ b/lily/spring-smob.cc
@@ -13,10 +13,8 @@
IMPLEMENT_SIMPLE_SMOBS (Spring);
SCM
-Spring::mark_smob (SCM x)
+Spring::mark_smob (SCM)
{
- (void)x;
-
return SCM_UNSPECIFIED;
}
diff --git a/lily/stem.cc b/lily/stem.cc
index 1f8b21e85f..3380d0cc17 100644
--- a/lily/stem.cc
+++ b/lily/stem.cc
@@ -229,11 +229,10 @@ Stem::is_normal_stem (Grob *me)
MAKE_SCHEME_CALLBACK (Stem, pure_height, 3)
SCM
-Stem::pure_height (SCM smob, SCM start, SCM end)
+Stem::pure_height (SCM smob,
+ SCM /* start */,
+ SCM /* end */)
{
- (void) start;
- (void) end;
-
Grob *me = unsmob_grob (smob);
Interval iv;
diff --git a/lily/translator-dispatch-list.cc b/lily/translator-dispatch-list.cc
index 4298ffedaf..5a6ce4a0a6 100644
--- a/lily/translator-dispatch-list.cc
+++ b/lily/translator-dispatch-list.cc
@@ -63,16 +63,16 @@ Engraver_dispatch_list::create (SCM trans_list,
}
SCM
-Engraver_dispatch_list::mark_smob (SCM x)
+Engraver_dispatch_list::mark_smob (SCM)
{
- (void)x;
return SCM_BOOL_F;
}
int
-Engraver_dispatch_list::print_smob (SCM x, SCM p, scm_print_state *)
+Engraver_dispatch_list::print_smob (SCM /* x */,
+ SCM p,
+ scm_print_state *)
{
- (void)x;
scm_puts ("#<Engraver_dispatch_list>", p);
return 1;
}