Build with gcc5 too.
authorJaromír Mikeš <mira.mikes@seznam.cz>
Mon, 25 Jul 2016 13:54:57 +0000 (15:54 +0200)
committerJaromír Mikeš <mira.mikes@seznam.cz>
Mon, 25 Jul 2016 13:54:57 +0000 (15:54 +0200)
debian/patches/03-build_with_gcc6.patch

index c220a9a2971be5c9e20354ab7ff6274208a35f64..e3ddbbb1068efbb3c30f76561b47eaf033068645 100644 (file)
@@ -23,21 +23,29 @@ Index: giada/src/glue/glue.cpp
 ===================================================================
 --- giada.orig/src/glue/glue.cpp
 +++ giada/src/glue/glue.cpp
-@@ -711,7 +711,7 @@ void glue_setPanning(class gdEditor *win
+@@ -56,6 +56,7 @@
+ #include "../core/patch_DEPR_.h"
+ #include "../core/conf.h"
+ #include "glue.h"
++#include <math.h>
+ extern gdMainWindow *mainWin;
+@@ -711,7 +712,7 @@ void glue_setPanning(class gdEditor *win
                ch->panRight= 0.0f + val;
  
                char buf[8];
 -              sprintf(buf, "%d L", abs((ch->panRight * 100.0f) - 100));
-+              sprintf(buf, "%f L", abs((ch->panRight * 100.0f) - 100));
++              sprintf(buf, "%f L", fabs((ch->panRight * 100.0f) - 100));
                win->panNum->value(buf);
        }
        else if (val == 1.0f) {
-@@ -724,7 +724,7 @@ void glue_setPanning(class gdEditor *win
+@@ -724,7 +725,7 @@ void glue_setPanning(class gdEditor *win
                ch->panRight= 1.0f;
  
                char buf[8];
 -              sprintf(buf, "%d R", abs((ch->panLeft * 100.0f) - 100));
-+              sprintf(buf, "%f R", abs((ch->panLeft * 100.0f) - 100));
++              sprintf(buf, "%f R", fabs((ch->panLeft * 100.0f) - 100));
                win->panNum->value(buf);
        }
        win->panNum->redraw();
@@ -45,21 +53,29 @@ Index: giada/src/gui/dialogs/gd_editor.cpp
 ===================================================================
 --- giada.orig/src/gui/dialogs/gd_editor.cpp
 +++ giada/src/gui/dialogs/gd_editor.cpp
-@@ -202,7 +202,7 @@ gdEditor::gdEditor(SampleChannel *ch)
+@@ -45,6 +45,7 @@
+ #include "gd_editor.h"
+ #include "gd_mainWindow.h"
+ #include "gd_warnings.h"
++#include <math.h>
+ extern Mixer         G_Mixer;
+@@ -202,7 +203,7 @@ gdEditor::gdEditor(SampleChannel *ch)
  
    if (ch->panRight < 1.0f) {
      char buf[8];
 -    sprintf(buf, "%d L", abs((ch->panRight * 100.0f) - 100));
-+    sprintf(buf, "%f L", abs((ch->panRight * 100.0f) - 100));
++    sprintf(buf, "%f L", fabs((ch->panRight * 100.0f) - 100));
      pan->value(ch->panRight);
      panNum->value(buf);
    }
-@@ -212,7 +212,7 @@ gdEditor::gdEditor(SampleChannel *ch)
+@@ -212,7 +213,7 @@ gdEditor::gdEditor(SampleChannel *ch)
    }
    else {
      char buf[8];
 -    sprintf(buf, "%d R", abs((ch->panLeft * 100.0f) - 100));
-+    sprintf(buf, "%f R", abs((ch->panLeft * 100.0f) - 100));
++    sprintf(buf, "%f R", fabs((ch->panLeft * 100.0f) - 100));
      pan->value(2.0f - ch->panLeft);
      panNum->value(buf);
    }