Add a workaround for a GCC 4.5 bug. psp
authorachurch
Sat, 25 Dec 2010 10:34:40 +0900
branchpsp
changeset 631 bb9d270f0fcb
parent 630 70159ba7543b
child 638 be05b378ec73
Add a workaround for a GCC 4.5 bug. This patch adds a workaround to the AquariaPSPBuilder and oggtomp3 tools to avoid a bug in GCC 4.5 which causes spurious compilation errors. See: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46028
PSP/tools/AquariaPSPBuilder.c
PSP/tools/oggtomp3.c
--- a/PSP/tools/AquariaPSPBuilder.c	Sat Dec 25 10:26:54 2010 +0900
+++ b/PSP/tools/AquariaPSPBuilder.c	Sat Dec 25 10:34:40 2010 +0900
@@ -1794,7 +1794,9 @@
     /* Encode the audio as MP3. */
 
     const int blocksize = 8192;
+#define blocksize 8192 //Avoid a spurious error from GCC 4.5 (bugzilla #46028).
     uint8_t mp3_buffer[blocksize*5/4 + 7200];
+#undef blocksize
     uint32_t pos;
 
     for (pos = 0; pos < num_samples; pos += blocksize) {
--- a/PSP/tools/oggtomp3.c	Sat Dec 25 10:26:54 2010 +0900
+++ b/PSP/tools/oggtomp3.c	Sat Dec 25 10:34:40 2010 +0900
@@ -204,7 +204,9 @@
     /* Encode the audio as MP3 and write it to the output file. */
 
     const int blocksize = 8192;
+#define blocksize 8192 //Avoid a spurious error from GCC 4.5 (bugzilla #46028).
     uint8_t mp3_buffer[blocksize*5/4 + 7200];
+#undef blocksize
     uint32_t pos;
 
     for (pos = 0; pos < num_samples; pos += blocksize) {