1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667
|
Fix trivial compilation warnings.
Index: nted/commands/changetimsigcommand.cpp
===================================================================
--- nted.orig/commands/changetimsigcommand.cpp 2013-07-01 10:03:40.000000000 +0200
+++ nted/commands/changetimsigcommand.cpp 2013-07-01 10:03:40.000000000 +0200
@@ -26,7 +26,7 @@
NedChangeTimeSigCommand::NedChangeTimeSigCommand(NedMainWindow *main_window, int newnum, int newdenom, unsigned int newsymbol) :
m_main_window(main_window), m_new_num(newnum), m_new_denom(newdenom), m_new_symbol(newsymbol) {
- unsigned int duration = m_main_window->m_numerator * WHOLE_NOTE / m_main_window->m_denominator;
+ int duration = m_main_window->m_numerator * WHOLE_NOTE / m_main_window->m_denominator;
if (duration == m_new_num * WHOLE_NOTE / m_new_denom) {
m_new_upbeat_inverse = m_main_window->m_upbeat_inverse;
}
Index: nted/pangocairotext.cpp
===================================================================
--- nted.orig/pangocairotext.cpp 2013-07-01 10:03:40.000000000 +0200
+++ nted/pangocairotext.cpp 2013-07-01 10:03:40.000000000 +0200
@@ -399,7 +399,7 @@
computeCursorPosition();
return;
}
- if (m_cursor_idx == g_utf8_strlen(m_measure_text, -1)) {
+ if (m_cursor_idx == (unsigned int)g_utf8_strlen(m_measure_text, -1)) {
strcpy(str1, m_text);
strcat(str1, text);
setText(str1, zoom, m_hide_hyphen);
Index: nted/idiotseditor/idiotseditor.cpp
===================================================================
--- nted.orig/idiotseditor/idiotseditor.cpp 2013-07-01 10:03:40.000000000 +0200
+++ nted/idiotseditor/idiotseditor.cpp 2013-07-01 10:03:40.000000000 +0200
@@ -271,7 +271,7 @@
void NedIdiotsInstrument::draw(Display *dpy, Drawable d, GC xgc, GC x_border_gc, double zoom_value, double xleft, double ytop, double visible_start_pos, double visible_end_pos) {
GList *lptr;
NedIdNote *note;
- int voice;
+ //int voice;
XSetLineAttributes(dpy, x_border_gc, NOTE_BORDER_LINE_THICK, LineSolid, CapRound, JoinMiter);
XSetForeground(dpy, x_border_gc, 0x000000);
@@ -640,7 +640,6 @@
NedIdNote * note;
unsigned long long duration, start_time, end_time, split_time;
int dist;
- int pitch;
int pos;
int voi;
int key;
@@ -689,7 +688,6 @@
break;
}
end_time = note->m_midi_stop;
- pitch = note->m_pitch;
note->m_midi_stop = split_time;
if (note->m_max_stop > 0 && note->m_max_stop <= note->m_midi_start) {
NedResource::Abort("NedIdiotsInstrument::splitNotesAtMeasureStart(3)");
@@ -1577,7 +1575,6 @@
if (note->m_midi_stop / FACTOR * zoom_value < visible_start_pos) continue;
double startpos = X_POS(note->m_midi_start);
double endpos = X_POS(note->m_midi_stop);
- double ypos = PITCH_TO_YPOS(note->m_pitch);
if (note->isInRect(event->x, event->y, zoom_value, xleft, ytop)) {
m_selected_note = note;
dist = event->x - startpos;
@@ -1618,7 +1615,7 @@
m_current_instrument_number(0), m_channel_nr(0), m_last_inserted(NULL),
m_sort_according_instrument(sort_instruments), m_dont_split(dont_split),
m_X11version(X11Version), m_min_denom(1), m_instruments(NULL), m_specials(NULL),
- m_mouse_x(0.0), m_mouse_y(0.0), m_dpy(NULL), m_off_x(0.0), m_off_y(0.0) {
+ m_mouse_x(0.0), m_mouse_y(0.0), m_off_x(0.0), m_off_y(0.0), m_dpy(NULL) {
m_pending_inst_name[0] = '\0';
GtkWidget *menubar;
@@ -1837,7 +1834,6 @@
double xleft = gtk_adjustment_get_value(id_editor->m_hadjust);
double ytop = gtk_adjustment_get_value(id_editor->m_vadjust);
int width = id_editor->m_drawing_area->allocation.width;
- int height = id_editor->m_drawing_area->allocation.height;
visible_start_pos = xleft;
visible_end_pos = xleft + width;
@@ -1858,7 +1854,6 @@
if ((event->state & GDK_BUTTON1_MASK) == 0) return FALSE;
NedIdiotsEditor *id_editor = (NedIdiotsEditor*) data;
if (id_editor->motion_mode == MOTION_MODE_NONE) return FALSE;
- NedIdiotsInstrument *inst = (NedIdiotsInstrument *) g_list_first(id_editor->m_instruments)->data;
id_editor->m_off_x = event->x - id_editor->m_mouse_x;
id_editor->m_off_y = event->y - id_editor->m_mouse_y;
id_editor->repaint();
@@ -1878,13 +1873,14 @@
id_editor->motion_mode = MOTION_MODE_NONE;
id_editor->m_off_x = id_editor->m_off_y = 0.0;
id_editor->repaint();
+ return FALSE;
}
void NedIdiotsInstrument::recomputeNotes(double zoom_value, double xleft, double ytop) {
if (!m_selected_note) return;
GList *lptr;
NedIdNote *note;
- unsigned int f, snap, xpitch;
+ unsigned int f, snap;
double xstart, xend, ypos;
unsigned int newstart, newstop;
int newpitch;
Index: nted/dialogs/staffcontextdialog.cpp
===================================================================
--- nted.orig/dialogs/staffcontextdialog.cpp 2013-07-01 10:03:40.000000000 +0200
+++ nted/dialogs/staffcontextdialog.cpp 2013-07-01 10:03:40.000000000 +0200
@@ -820,7 +820,6 @@
gboolean NedStaffContextDialog::draw_clefs(GtkWidget *widget, GdkEventExpose *event, gpointer data) {
#define ZOOM_LEVEL 9
NedStaffContextDialog *the_dialog = (NedStaffContextDialog *) data;
- cairo_scaled_font_t *scaled_font;
cairo_glyph_t glyph;
int i;
double y_offs = 0.0, oct_y_offs = 0.0, oct_x_offs = 0.0;
@@ -834,10 +833,12 @@
cairo_fill(cr);
cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
- scaled_font = NedResource::getScaledFont(ZOOM_LEVEL);
#ifdef HAS_SET_SCALED_FONT
+ cairo_scaled_font_t *scaled_font;
+ scaled_font = NedResource::getScaledFont(ZOOM_LEVEL);
cairo_set_scaled_font (cr, scaled_font);
#else
+ NedResource::getScaledFont(ZOOM_LEVEL);
cairo_set_font_face(cr, NedResource::getFontFace());
cairo_set_font_matrix(cr, NedResource::getFontMatrix(ZOOM_LEVEL));
cairo_set_font_options(cr, NedResource::getFontOptions());
@@ -1026,7 +1027,6 @@
void NedStaffContextDialog::OnVoiceToggle(GtkToggleButton *togglebutton, gpointer data) {
NedStaffContextDialog *context_dialog = (NedStaffContextDialog *) data;
- int oldvoice = context_dialog->m_current_voice;
if (togglebutton == GTK_TOGGLE_BUTTON(context_dialog->m_radio_all)) {
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(context_dialog->m_radio_all))) {
@@ -1094,7 +1094,6 @@
}
void NedStaffContextDialog::OnSingleMutedToggle(GtkToggleButton *togglebutton, gpointer data) {
- int i;
bool toggle_state;
bool all_muted = true;
bool none_muted = true;
Index: nted/dialogs/clefconfigdialog.cpp
===================================================================
--- nted.orig/dialogs/clefconfigdialog.cpp 2013-07-01 10:03:40.000000000 +0200
+++ nted/dialogs/clefconfigdialog.cpp 2013-07-01 10:03:40.000000000 +0200
@@ -130,7 +130,6 @@
gboolean NedClefConfigDialog::draw_clefs(GtkWidget *widget, GdkEventExpose *event, gpointer data) {
#define ZOOM_LEVEL 9
NedClefConfigDialog *the_dialog = (NedClefConfigDialog *) data;
- cairo_scaled_font_t *scaled_font;
cairo_glyph_t glyph;
int i;
double y_offs = 0.0, oct_y_offs = 0.0, oct_x_offs = 0.0;
@@ -144,10 +143,12 @@
cairo_fill(cr);
cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
- scaled_font = NedResource::getScaledFont(ZOOM_LEVEL);
#ifdef HAS_SET_SCALED_FONT
+ cairo_scaled_font_t *scaled_font;
+ scaled_font = NedResource::getScaledFont(ZOOM_LEVEL);
cairo_set_scaled_font (cr, scaled_font);
#else
+ NedResource::getScaledFont(ZOOM_LEVEL);
cairo_set_font_face(cr, NedResource::getFontFace());
cairo_set_font_matrix(cr, NedResource::getFontMatrix(ZOOM_LEVEL));
cairo_set_font_options(cr, NedResource::getFontOptions());
Index: nted/dialogs/druminfo.cpp
===================================================================
--- nted.orig/dialogs/druminfo.cpp 2013-07-01 10:03:40.000000000 +0200
+++ nted/dialogs/druminfo.cpp 2013-07-01 10:03:40.000000000 +0200
@@ -76,7 +76,7 @@
{"ridecymbala", "cymra",51, CROSS_NOTE3, NULL, 9 },
{"hibongo", "boh", 60, NORMAL_NOTE, NULL, 3 },
{"ridebell", "rb", 53, NORMAL_NOTE, NULL, 9 },
- {NULL, NULL, 0, NULL, NULL}
+ {NULL, NULL, 0, 0, NULL, 0}
};
struct d_info_str current_dinfo[G_N_ELEMENTS(default_dinfo)];
Index: nted/dialogs/tools.cpp
===================================================================
--- nted.orig/dialogs/tools.cpp 2013-07-01 10:03:40.000000000 +0200
+++ nted/dialogs/tools.cpp 2013-07-01 10:03:40.000000000 +0200
@@ -319,13 +319,11 @@
bool X11buttonGroup::allowStateChange(X11button *button) {
GList *lptr;
int c = 0;
- bool isAmongActives = false;
if (m_all_inactive_allowed) return true;
for (lptr = g_list_first(m_buttons); lptr; lptr = g_list_next(lptr)) {
if (!((X11button *) lptr->data)->m_active) continue;
c++;
- if ((X11button *) lptr->data == button) isAmongActives = true;
}
if (c > 1) return true;
@@ -360,13 +358,11 @@
#define CREATE_MINI_X11_EMPTY(back, up) createX11PixmapFromGdkPixbuffer(dpy, screen, d, ggc, NULL, back, up);
NedTools::NedTools() :
- m_back_pix(NULL), m_current_row(-1), m_current_column(-1), m_current_panel(0), m_buttons_created(false), m_dpy(NULL)
+ m_dpy(NULL), m_back_pix(NULL), m_current_row(-1), m_current_column(-1), m_current_panel(0), m_buttons_created(false)
{
GdkColor bgcolor;
int wx, wy;
NedMainWindow *last_main;
- GdkDisplay *display = NULL;
- GdkScreen *screen = NULL;
m_toolbox = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (m_toolbox), _("Toolbox"));
@@ -383,8 +379,6 @@
m_mini_spaces = (4 * m_back_img_width - 4 * m_back_miniimg_width) / 5;
if ((last_main = NedResource::getMainwWindowWithLastFocus()) != NULL) {
- display = gdk_display_get_default ();
- screen = gdk_display_get_default_screen (display);
gdk_window_get_root_origin(GDK_WINDOW(last_main->getWindow()->window), &wx, &wy);
gtk_window_move(GTK_WINDOW (m_toolbox), wx + NedResource::m_toolboxX, wy + NedResource::m_toolboxY);
}
@@ -454,13 +448,9 @@
void NedTools::setToolboxTransient(NedMainWindow *m_win) {
int wx, wy;
- GdkDisplay *display = NULL;
- GdkScreen *screen = NULL;
gtk_window_set_transient_for(GTK_WINDOW (m_toolbox), (GTK_WINDOW (m_win->getWindow())));
- display = gdk_display_get_default ();
- screen = gdk_display_get_default_screen (display);
gdk_window_get_root_origin(GDK_WINDOW(m_win->getWindow()->window), &wx, &wy);
gtk_window_move(GTK_WINDOW (m_toolbox), wx + NedResource::m_toolboxX, wy + NedResource::m_toolboxY);
Index: nted/dialogs/drumconfigdialog.cpp
===================================================================
--- nted.orig/dialogs/drumconfigdialog.cpp 2013-07-01 10:03:40.000000000 +0200
+++ nted/dialogs/drumconfigdialog.cpp 2013-07-01 10:03:40.000000000 +0200
@@ -748,7 +748,6 @@
gboolean NedDrumConfigDialog::OnExpose(GtkWidget *widget, GdkEventExpose *event, gpointer data) {
#define ZOOM_LEVEL 9
NedDrumConfigDialog *drum_config_dialog = (NedDrumConfigDialog *) data;
- cairo_scaled_font_t *scaled_font;
cairo_glyph_t glyph;
int i;
@@ -760,8 +759,9 @@
cairo_fill(cr);
cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
- scaled_font = NedResource::getScaledFont(ZOOM_LEVEL);
#ifdef HAS_SET_SCALED_FONT
+ cairo_scaled_font_t *scaled_font;
+ scaled_font = NedResource::getScaledFont(ZOOM_LEVEL);
cairo_set_scaled_font (cr, scaled_font);
#else
cairo_set_font_face(cr, NedResource::getFontFace());
Index: nted/chords/chorddialog.cpp
===================================================================
--- nted.orig/chords/chorddialog.cpp 2013-07-01 10:03:40.000000000 +0200
+++ nted/chords/chorddialog.cpp 2013-07-01 10:03:40.000000000 +0200
@@ -58,7 +58,6 @@
GtkObject *root_list_adjustment;
GtkWidget *root_list_scroll;
GtkListStore * modies_list_store;
- GtkCellRenderer *modies_list_renderer;
GtkTreeViewColumn *modies_list_column;
GtkObject *modies_list_adjustment;
GtkWidget *modies_list_scroll;
@@ -146,7 +145,6 @@
gtk_list_store_set (modies_list_store, &iter, 0, *cptr, -1);
}
m_modies_list_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(modies_list_store));
- modies_list_renderer = gtk_cell_renderer_text_new ();
modies_list_column = gtk_tree_view_column_new_with_attributes (_("mody"), root_list_renderer, "text", 0, NULL);
gtk_tree_view_append_column (GTK_TREE_VIEW (m_modies_list_view), modies_list_column);
modies_list_adjustment = gtk_adjustment_new (0.0, 0.0, ll, 1.0, 10.0, 10.0);
Index: nted/mainwindow.cpp
===================================================================
--- nted.orig/mainwindow.cpp 2013-07-01 10:03:40.000000000 +0200
+++ nted/mainwindow.cpp 2013-07-01 10:08:53.000000000 +0200
@@ -1168,7 +1168,6 @@
cairo_scaled_font_t *scaled_font;
bool dummy = false;
scaled_font = NedResource::getScaledFont(m_current_zoom_level);
- GdkColor sel_color;
//cairo_scale(cr, 0.4, 0.4);
#ifdef HAS_SET_SCALED_FONT
cairo_set_scaled_font (cr, scaled_font);
@@ -1208,8 +1207,6 @@
cairo_stroke(cr);
cairo_scale(cr, getCurrentScale(), getCurrentScale());
- sel_color.pixel = 0;
- sel_color.red = 200; sel_color.green = 0; sel_color.blue = 250;
for (lptr = g_list_first(m_selected_group); lptr; lptr = g_list_next(lptr)) {
((NedChordOrRest *) lptr->data)->draw(cr, &dummy);
}
@@ -1224,9 +1221,9 @@
bool dummy;
cairo_t *cr;
cr = gdk_cairo_create (m_drawing_area->window);
+#ifdef HAS_SET_SCALED_FONT
cairo_scaled_font_t *scaled_font;
scaled_font = NedResource::getScaledFont(m_current_zoom_level);
-#ifdef HAS_SET_SCALED_FONT
cairo_set_scaled_font (cr, scaled_font);
#else
cairo_set_font_face(cr, NedResource::getFontFace());
@@ -3725,7 +3722,7 @@
GList *lptr;
int i, j, k;
unsigned int m, voice_mask[m_staff_count];
- int the_voice = 0, voice_count[m_staff_count];
+ int voice_count[m_staff_count];
int last_line;
unsigned int midi_len;
NedSystem *last_system = NULL, *dummy = NULL;
@@ -3834,12 +3831,10 @@
}
clef_number = m_staff_contexts[i].m_clef_number;
voice_count[i] = 0;
- the_voice = 0;
for (j = 0; j < VOICE_COUNT; j++) {
m = (1 << j);
if ((m & voice_mask[i]) != 0) {
voice_count[i]++;
- the_voice = j;
}
}
@@ -6493,7 +6488,6 @@
bool NedMainWindow::do_import_from_other(NedImporter *im) {
int i, j;
- bool first = true;
bool first_measure = true;
bool overflow;
NedPage *current_page;
@@ -6603,7 +6597,6 @@
current_page->insertSystem(current_system);
}
current_system = current_page->appendSystem();
- first = false;
}
while (!im->is_eof()) {
current_system->empty();
@@ -7135,7 +7128,6 @@
bool state, portrait;
const char *paper;
int w, h;
- bool p;
if (NedResource::isPlaying()) return;
NedMainWindow *main_window = (NedMainWindow *) data;
@@ -7147,7 +7139,6 @@
struct paper_info_struct *paper_type = NedResource::getPaperInfo(paper);
w = main_window->m_current_paper->width;
h = main_window->m_current_paper->height;
- p = main_window->m_portrait;
if (main_window->m_portrait != portrait || paper_type->width != w || paper_type->height != h) {
//NedCommandList *dummy = new NedCommandList(main_window);
NedCommandList *command_list = new NedCommandList(main_window);
@@ -7241,18 +7232,14 @@
}
int NedMainWindow::setChannelFromCursor() {
- GdkDisplay *display = NULL;
NedStaff *staff;
double dummy1;
int dummy2;
gint x=0, y=0;
GList *lptr;
bool found = false;
- GdkScreen *screen = NULL;
gtk_widget_get_pointer(m_drawing_area, &x, &y);
- display = gdk_display_get_default();
- screen = gdk_display_get_default_screen(display);
for (lptr = g_list_first(m_pages); lptr; lptr = g_list_next(lptr)) {
if (((NedPage *) lptr->data)->findLine(x, y, &dummy1, &dummy2, &dummy1, &staff)) {
found = true; break;
Index: nted/resource.cpp
===================================================================
--- nted.orig/resource.cpp 2013-07-01 10:03:40.000000000 +0200
+++ nted/resource.cpp 2013-07-01 10:03:40.000000000 +0200
@@ -2676,9 +2676,9 @@
void NedResource::handleDSalCoda(bool da_capo) {
GList *segno = NULL, *dal_segno_al_coda = NULL, *al_coda = NULL, *coda = NULL;
unsigned long long segno_time = 0, dal_segno_al_coda_time = 0, al_coda_time = 0, coda_time = 0;
- GList *lptr1, *lptr2, *lptr3;
+ GList *lptr1, *lptr2;
GList *repeat_part;
- bool repeat_found, al_coda_found, inside_repeat, before_segno_al_coda, sequ_error;
+ bool inside_repeat, before_segno_al_coda, sequ_error;
unsigned short repeat_signal = (da_capo ? SEGNO_D_CAPO_AL_CODA : SEGNO_D_S_AL_CODA);
for (lptr1 = g_list_first(m_midi_events); lptr1; lptr1 = g_list_next(lptr1)) {
@@ -2699,7 +2699,6 @@
}
else {
for (lptr1 = g_list_last(m_midi_events); lptr1; lptr1 = g_list_previous(lptr1)) {
- if (lptr1 == dal_segno_al_coda) repeat_found = true;
lptr2 = g_list_first(((MidiListStruct *) lptr1->data)->notes);
for (; lptr2; lptr2 = g_list_next(lptr2)) {
if ((((MidiEventStruct *) lptr2->data)->segno_sign & SEGNO_SIGN) != 0 &&
@@ -2715,7 +2714,6 @@
sequ_error = false;
inside_repeat = false;
- al_coda_found = false;
inside_repeat = false;
for (lptr1 = g_list_last(m_midi_events); !sequ_error && lptr1; lptr1 = g_list_previous(lptr1)) {
if (lptr1 == segno) break;
@@ -2789,7 +2787,6 @@
(((MidiEventStruct *) lptr2->data)->type & NOTE_MASK) == SND_SEQ_EVENT_NOTEON) { // eventually with PSEUDO2_FLAG (rest)
coda = lptr1;
coda_time = ((MidiEventStruct *) lptr2->data)->midi_time;
- lptr3 = g_list_previous(lptr1);
break;
}
}
Index: nted/staff.cpp
===================================================================
--- nted.orig/staff.cpp 2013-07-01 10:03:40.000000000 +0200
+++ nted/staff.cpp 2013-07-01 10:03:40.000000000 +0200
@@ -1023,7 +1023,7 @@
}
void NedStaff::prepareReplay(bool with_keysig) {
- int i, j;
+ int i;
GList *lptr;
for (i = 0; i < VOICE_COUNT; i++) {
Index: nted/voice.cpp
===================================================================
--- nted.orig/voice.cpp 2013-07-01 10:03:40.000000000 +0200
+++ nted/voice.cpp 2013-07-01 10:03:40.000000000 +0200
@@ -598,7 +598,6 @@
int minpos = -1;
unsigned long long offs;
int half_offset;
- int num_elements_to_delete = 1;
int clef = TREBLE_CLEF, keysig_so_far, octave_shift;
bool greater_than_last;
GList *min_pos_ptr = NULL;
@@ -764,7 +763,6 @@
sum_of_chords_and_rests_to_delete -= chord_or_rest->getDuration();
if (chords_and_rests_to_delete != NULL) {
command_list->addCommand(new NedDeleteChordOrRestGroupCommand(this, chords_and_rests_to_delete));
- num_elements_to_delete = g_list_length(chords_and_rests_to_delete);
}
command_list->addCommand(new NedInsertChordOrRestCommand(this, minpos++, chord_or_rest));
last_tupleted_chord_or_rest = chord_or_rest;
@@ -1126,7 +1124,6 @@
unsigned int duration;
NedDeleteChordOrRestGroupCommand *command;
NedMeasure *measure = NULL;
- bool only_rests = true;
bool measure_start_seen = false;
start_ptr = g_list_first(items);
@@ -1170,7 +1167,6 @@
if (element->getSystem() != the_system) continue;
if (element->getStaff() != m_staff) continue;
if (element->getVoice() != this) continue;
- if (!element->isRest()) only_rests = false;
//measure = getSystem()->getMeasure(element->getMidiTime());
measure = element->m_measure;
if (element->getMidiTime() == measure->midi_start) {
@@ -1254,14 +1250,13 @@
unsigned long long offs;
bool was_last_in_tuplet;
NedTuplet *tuplet_ptr;
- int tuplet_val, tuplet_val_raw;
+ int tuplet_val;
int new_dot_count = NedResource::getDotCount();
lptr = g_list_find(m_chord_or_rests, chord_or_rest);
if (lptr == NULL) {
return FALSE;
}
tuplet_val = chord_or_rest->getTupletVal();
- tuplet_val_raw = chord_or_rest->getTupletValRaw();
was_last_in_tuplet = chord_or_rest->hasLastTupletFlag();
chord_or_rest->setLastTupletFlag(FALSE);
new_duration = NedChordOrRest::computeDuration(NedResource::getCurrentLength(), NedResource::getDotCount(), chord_or_rest->getTupletVal());
@@ -1356,7 +1351,6 @@
NedChordOrRest *chord_or_rest = NULL, *last_tupleted_chord_or_rest;
int minpos;
GList *min_pos_ptr;
- int num_elements_to_delete;
unsigned long long new_chords_midi_end_time;
unsigned long long ref_duration;
int num_additional_rests;
@@ -1406,7 +1400,6 @@
}
if (chords_and_rests_to_delete != NULL) {
command_list->addCommand(new NedDeleteChordOrRestGroupCommand(this, chords_and_rests_to_delete));
- num_elements_to_delete = g_list_length(chords_and_rests_to_delete);
}
command_list->addCommand(new NedSetToTupletCommand(templ, tuplet_val));
num_additional_rests = (method == 1) ? tuplet_val - 2 : tuplet_val - 1;
Index: nted/chordorrest.cpp
===================================================================
--- nted.orig/chordorrest.cpp 2013-07-01 10:03:40.000000000 +0200
+++ nted/chordorrest.cpp 2013-07-01 10:03:40.000000000 +0200
@@ -1185,7 +1185,6 @@
void NedChordOrRest::setLength(int length) {
m_length = length;
- unsigned int upbeat;
unsigned int measure_length;
if (m_length == WHOLE_NOTE) {
if (m_voice->getVoiceNumber() > 0) {
@@ -1194,7 +1193,6 @@
}
else if (m_midi_time == 0 && getMainWindow()->getUpBeatInverse() > 0) {
measure_length = getMainWindow()->getNumerator() * WHOLE_NOTE / getMainWindow()->getDenominator();
- upbeat = measure_length - getMainWindow()->getUpBeatInverse();
if (m_voice->getVoiceNumber() > 0 && getDuration() == measure_length) {
m_is_hidden = TRUE;
}
@@ -3566,7 +3564,7 @@
}
switch (ftext->m_font_weight) {
- case CAIRO_FONT_WEIGHT_BOLD: fprintf(fp, "%d ", WRITTEN_WEIGHT_BOLD); break;
+ case PANGO_WEIGHT_BOLD: fprintf(fp, "%d ", WRITTEN_WEIGHT_BOLD); break;
default: fprintf(fp, "%d ", WRITTEN_WEIGHT_NORMAL); break;
}
fprintf(fp, " ) ");
@@ -3617,10 +3615,6 @@
void NedChordOrRest::prepareMutedReplay() {
GList *lptr;
- int staff_nr;
- struct staff_context_str *contexts;
- staff_nr = getStaff()->getStaffNumber();
- contexts = getMainWindow()->m_staff_contexts;
for (lptr = g_list_first(m_freedisp); lptr; lptr = g_list_next(lptr)) {
if (((NedFreeReplaceable *) lptr->data)->getType() == FREE_PLACEABLE_TEMPO) {
@@ -3762,7 +3756,7 @@
GList *lptr;
bool force_length = false;
char restchar;
- int dotcount, tremolo;
+ int dotcount, tremolo = 0;
unsigned int duration, len2;
char Str[100], Str2[100];
int i;
Index: nted/note.cpp
===================================================================
--- nted.orig/note.cpp 2013-07-01 10:03:40.000000000 +0200
+++ nted/note.cpp 2013-07-01 10:03:40.000000000 +0200
@@ -581,7 +581,6 @@
void NedNote::removeUnneededAccidental(int clef, int keysig, int octave_shift) {
- int p;
int offs = 0;
char offs_array[OFFS_ARRAY_SIZE];
@@ -595,7 +594,6 @@
case TENOR_CLEF: offs = TENOR_PITCH_OFFS; break;
case SOPRAN_CLEF: offs = SOPRAN_PITCH_OFFS; break;
}
- p = lineToPitch[m_line+offs].pitch + octave_shift;
memset(offs_array, 0, sizeof(offs_array));
getStaff()->findAccidentals(offs_array, m_chord_or_rest->m_measure, m_chord_or_rest->getMidiTime(), false);
switch (m_status & ACCIDENTAL_MASK) {
@@ -1285,8 +1283,6 @@
int pitch;
int line;
bool flat;
- staff_context_str *context;
- context = &(getMainWindow()->m_staff_contexts[getStaff()->getStaffNumber()]);
getStaff()->getCurrentClefAndKeysig(m_chord_or_rest->getMidiTime(), &clef, &keysig, &octave_shift);
if (clef == NEUTRAL_CLEF3) {
exportLilyPondDrums(fp);
Index: nted/tuplet.cpp
===================================================================
--- nted.orig/tuplet.cpp 2013-07-01 10:03:40.000000000 +0200
+++ nted/tuplet.cpp 2013-07-01 10:03:40.000000000 +0200
@@ -140,16 +140,15 @@
}
void NedTuplet::reconfigureLast() {
- GList *lptr, *maxmidichordorrest;
+ GList *lptr;
unsigned int maxmiditime;
((NedChordOrRest *) g_list_first(m_chords)->data)->getVoice()->assignMidiTimes(); //recompute MIDI Times
- maxmidichordorrest = lptr = g_list_first(m_chords);
+ lptr = g_list_first(m_chords);
maxmiditime = ((NedChordOrRest *) lptr->data)->getMidiTime();
for (lptr = g_list_next(lptr); lptr; lptr = g_list_next(lptr)) {
if (((NedChordOrRest *) lptr->data)->getMidiTime() > maxmiditime) {
maxmiditime = ((NedChordOrRest *) lptr->data)->getMidiTime();
- maxmidichordorrest = lptr;
}
}
for (lptr = g_list_first(m_chords); lptr; lptr = g_list_next(lptr)) {
Index: nted/clipboard.cpp
===================================================================
--- nted.orig/clipboard.cpp 2013-07-01 10:03:40.000000000 +0200
+++ nted/clipboard.cpp 2013-07-01 10:03:40.000000000 +0200
@@ -64,7 +64,7 @@
element->from_staff->deleteStaffElements(false, element->chords_or_rests_to_move, m_reftime, m_duration);
if (!m_delete_only) {
if (element->to_staff == NULL) {
- printf("element = 0x%x\n", element); fflush(stdout);
+ printf("element = 0x%p\n", element); fflush(stdout);
NedResource::Abort("element->to_staff == NULL");
}
element->to_staff->insertIntoStaff(element->chords_or_rests_to_move, m_duration);
Index: nted/midiexport.cpp
===================================================================
--- nted.orig/midiexport.cpp 2013-07-01 10:03:40.000000000 +0200
+++ nted/midiexport.cpp 2013-07-01 10:03:40.000000000 +0200
@@ -349,7 +349,7 @@
void NedMidiExport::writeTrack(GList *midi_events, int track_nr, int num, int denom) {
GList *lptr1, *lptr2;
- unsigned long long myTime, lastEventTime = 0, newlasteventtime = 0;
+ unsigned long long lastEventTime = 0, newlasteventtime = 0;
int channel = m_main_window->m_staff_contexts[track_nr].m_midi_channel;
long pos1, pos0, length;
bool time_written;
@@ -359,8 +359,6 @@
unsigned int textlen = 0;
int lyrics_idx;
- myTime = 0;
-
writeString(strdup("MTrk"));
pos0 = ftell(m_midiout);
writeDWord(0);
Index: nted/positionarray.cpp
===================================================================
--- nted.orig/positionarray.cpp 2013-07-01 10:03:40.000000000 +0200
+++ nted/positionarray.cpp 2013-07-01 10:03:40.000000000 +0200
@@ -203,7 +203,6 @@
NedNote **notes_with_accidentals = (NedNote **) alloca(MAX_NOTES_PER_WITH_ACCIDENTALS_STAFF * m_staff_count * sizeof(NedNote *));
NedNote **nptr;
unsigned int *num_notes_with_accidentals_per_staff = (unsigned int *) alloca(m_staff_count * sizeof(unsigned int));
- unsigned int accidental_columns;
double acc_d;
memset(num_notes_with_accidentals_per_staff, 0, m_staff_count * sizeof(unsigned int));
@@ -222,7 +221,6 @@
}
}
- accidental_columns = 0;
for (i = 0; i < m_staff_count; i++) {
nptr = notes_with_accidentals + MAX_NOTES_PER_WITH_ACCIDENTALS_STAFF * i;
acc_places[0] = acc_places[1] = acc_places[2] = acc_places[3] = -10000;
|