From:
[email protected]
Package: brahms
Severity: normal
Tags: patch
When building 'brahms' with gcc-3.4 I get the following error:
g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I/usr/include/kde -I/usr/include/qt3 -I/usr/X11R6/include -I../../../brahms/core -I../../../brahms -UQT_NO_ASCII_CAST -O2 -Wno-deprecated -fno-exceptions -fno-check-new -DQT_CLEAN_NAMESPACE -Wp,-MD,.deps/
qtScoreSymbols.pp -c qtScoreSymbols.cpp -fPIC -DPIC -o .libs/qtScoreSymbols.o qtScoreSymbols.cpp: In constructor `QtSymbols::QtSymbols(PrScoreEditor*, QPixmap*, int&, int, int, const char*, int)':
qtScoreSymbols.cpp:20: error: array bound forbidden after parenthesized type-id qtScoreSymbols.cpp:20: note: try removing the parentheses around the type-id make[5]: *** [qtScoreSymbols.lo] Error 1
make[5]: Leaving directory `/brahms-1.02-kde3/brahms/presentations/kde'
With the attached patch 'brahms' can be compiled using gcc-3.4.
Regards
Andreas Jochens
diff -urN ../tmp-orig/brahms-1.02-kde3/brahms/addons/Riemann/harmony.cpp ./brahms/addons/Riemann/harmony.cpp
--- ../tmp-orig/brahms-1.02-kde3/brahms/addons/Riemann/harmony.cpp 2002-01-07 00:35:46.000000000 +0100
+++ ./brahms/addons/Riemann/harmony.cpp 2004-08-18 17:00:03.086872409 +0200
@@ -45,7 +45,7 @@
void Harmony::analyse() {
// cout << endl << "ANALYSE: " << endl << sKey[_base_key] << " (" << sGenus[_base_gen] << ") " << sKey[_key] << " (" << sGenus[_genus] << ") : " << _chord;
- for (Key s=UNDEFKEY; s<KEY; ((int) s)++) {
+ for (Key s=UNDEFKEY; s<KEY; (Key)(((int) s) + 1)) {
_maj[s] = 0;
_min[s] = 0;
_dim[s] = 0;
@@ -72,7 +72,7 @@
Key mykey = UNDEFKEY;
Genus mygen = UNDEFGEN;
- for (Key k=GES; k<KEY; ((int)k)++) {
+ for (Key k=GES; k<KEY; (Key)(((int)k) + 1)) {
if (max < _maj[k]) { max = _maj[k]; mykey = k; mygen = MAJOR; }
if (max < _min[k]) { max = _min[k]; mykey = k; mygen = MINOR; }
if (max < _dim[k]) { max = _dim[k]; mykey = k; mygen = DIMINISHED; }
diff -urN ../tmp-orig/brahms-1.02-kde3/brahms/addons/Riemann/riemannEvent.cpp ./brahms/addons