My manual analysis says that none of these are strictly necessary,
(the various conditionals currently ensure that none of the variables
are ever used uninitialized). But "gcc -O2" likes to complain, so
these initializations keep it quiet.
{
scherzo_t *scherzo = user_data;
int octave;
- score_pitch_name_t pitch_name;
+ /* Initialize to keep the compiler quiet. */
+ score_pitch_name_t pitch_name = SCORE_PITCH_C;
score_pitch_t pitch;
if (scherzo->challenge.note)
{
scherzo_t *scherzo = user_data;
int octave;
- score_pitch_name_t pitch_name;
+ /* Initialize to keep the compiler quiet. */
+ score_pitch_name_t pitch_name = SCORE_PITCH_NAME_C;
score_pitch_t pitch;
if (scherzo->challenge.note)
if (score->num_braces)
{
- int brace_width;
+ /* Initialize to keep the compiler quiet. */
+ int brace_width = 0;
for (i = 0; i < score->num_braces; i++)
_draw_brace (score, cr, score->braces[i], &brace_width);