[ANNOUNCE] VDR developer version 1.3.31

Message ID 4311EE86.8030401@cadsoft.de
State New
Headers

Commit Message

Klaus Schmidinger Aug. 28, 2005, 5:04 p.m. UTC
  C.Y.M wrote:
> Udo Richter wrote:
> 
>>Klaus Schmidinger wrote:
>>
>>
>>> See PLUGINS/src/svdrpdemo for an example of how to use this feature.
>>
>>
>>... throws a warning on gcc 3.3.5:
>>svdrpdemo.c:13: Warning: `const char*MAINMENUENTRY' defined but not used
>>
>>If there are no plans to grep for this (like for VERSION) I suggest
>>dropping the whole line so no one gets confused by the warning.
>>
> 
> 
> I am also getting the following warnings in remux.c:
> 
> remux.c:537: warning: missing braces around initializer
> remux.c:537: warning: missing braces around initializer
> remux.c:537: warning: missing braces around initializer
> remux.c:537: warning: missing braces around initializer
> remux.c:537: warning: missing braces around initializer
> remux.c:537: warning: missing braces around initializer
> remux.c: In static member function `static bool
> cAudioRepacker::IsValidAudioHeader(uint32_t, bool, int*)':
> remux.c:596: warning: missing braces around initializer
> remux.c:603: warning: missing braces around initializer
> 
> Anyone know whats wrong?

The attached patch should fix this.

Klaus
  

Comments

Reinhard Nissl Aug. 28, 2005, 5:11 p.m. UTC | #1
Hi,

Klaus Schmidinger wrote:

>> I am also getting the following warnings in remux.c:
>>
>> remux.c:537: warning: missing braces around initializer
>> remux.c:537: warning: missing braces around initializer
>> remux.c:537: warning: missing braces around initializer
>> remux.c:537: warning: missing braces around initializer
>> remux.c:537: warning: missing braces around initializer
>> remux.c:537: warning: missing braces around initializer
>> remux.c: In static member function `static bool
>> cAudioRepacker::IsValidAudioHeader(uint32_t, bool, int*)':
>> remux.c:596: warning: missing braces around initializer
>> remux.c:603: warning: missing braces around initializer
>>
>> Anyone know whats wrong?

I'm sorry for causing these warnings. The arrays were originally one 
dimensional, but for my recent enhancements it was more suitable to make 
them multi dimensional.

Thanks to Klaus for supplying the initializer fix!

Bye.
  

Patch

--- remux.c	2005/08/28 11:46:44	1.42
+++ remux.c	2005/08/28 17:02:34
@@ -522,18 +522,22 @@ 
   };
 
 int cAudioRepacker::bitRates[2][3][16] = { // all values are specified as kbits/s
+  {
   // MPEG 1, Layer I
-  0,  32,  64,  96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, -1,
+  { 0,  32,  64,  96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, -1 },
   // MPEG 1, Layer II
-  0,  32,  48,  56,  64,  80,  96, 112, 128, 160, 192, 224, 256, 320, 384, -1,
+  { 0,  32,  48,  56,  64,  80,  96, 112, 128, 160, 192, 224, 256, 320, 384, -1 },
   // MPEG 1, Layer III
-  0,  32,  40,  48,  56,  64,  80,  96, 112, 128, 160, 192, 224, 256, 320, -1,
+  { 0,  32,  40,  48,  56,  64,  80,  96, 112, 128, 160, 192, 224, 256, 320, -1 }
+  },
+  {
   // MPEG 2, Layer I
-  0,  32,  48,  56,  64,  80,  96, 112, 128, 144, 160, 176, 192, 224, 256, -1,
+  { 0,  32,  48,  56,  64,  80,  96, 112, 128, 144, 160, 176, 192, 224, 256, -1 },
   // MPEG 2, Layer II/III
-  0,   8,  16,  24,  32,  40,  48,  56,  64,  80,  96, 112, 128, 144, 160, -1,
+  { 0,   8,  16,  24,  32,  40,  48,  56,  64,  80,  96, 112, 128, 144, 160, -1 },
   // MPEG 2, Layer II/III
-  0,   8,  16,  24,  32,  40,  48,  56,  64,  80,  96, 112, 128, 144, 160, -1
+  { 0,   8,  16,  24,  32,  40,  48,  56,  64,  80,  96, 112, 128, 144, 160, -1 }
+  }
   };
 
 cAudioRepacker::cAudioRepacker(void)
@@ -590,16 +594,16 @@ 
      else {
         static int samplingFrequencies[2][4] = { // all values are specified in Hz
           // MPEG 1
-          44100, 48000, 32000, -1,
+          { 44100, 48000, 32000, -1 },
           // MPEG 2
-          22050, 24000, 16000, -1
+          { 22050, 24000, 16000, -1 }
           };
 
         static int slots_per_frame[2][3] = {
           // MPEG 1, Layer I, II, III
-          12, 144, 144,
+          { 12, 144, 144 },
           // MPEG 2, Layer I, II, III
-          12, 144,  72
+          { 12, 144,  72 }
           };
 
         int mpegIndex = 1 - id;