diff mbox

[3/6] Fix compilation warning due to incorrectly specified type

Message ID 1306516951-31105-4-git-send-email-cerbere@gmail.com
State New
Headers show

Commit Message

Alexandre Raymond May 27, 2011, 5:22 p.m. UTC
In audio/coreaudio.c, a variable named "str" was assigned "const char" values,
which resulted in the following warnings:

-----8<-----
audio/coreaudio.c: In function ‘coreaudio_logstatus’:
audio/coreaudio.c:59: warning: initialization discards qualifiers from pointer target type
audio/coreaudio.c:63: warning: assignment discards qualifiers from pointer target type
(...)
-----8<-----

Signed-off-by: Alexandre Raymond <cerbere@gmail.com>
---
 audio/coreaudio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Stefan Weil May 27, 2011, 5:42 p.m. UTC | #1
Am 27.05.2011 19:22, schrieb Alexandre Raymond:
> In audio/coreaudio.c, a variable named "str" was assigned "const char" values,
> which resulted in the following warnings:
>
> -----8<-----
> audio/coreaudio.c: In function ‘coreaudio_logstatus’:
> audio/coreaudio.c:59: warning: initialization discards qualifiers from pointer target type
> audio/coreaudio.c:63: warning: assignment discards qualifiers from pointer target type
> (...)
> -----8<-----
>
> Signed-off-by: Alexandre Raymond<cerbere@gmail.com>
> ---
>   audio/coreaudio.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/audio/coreaudio.c b/audio/coreaudio.c
> index 0a26413..3bd75cd 100644
> --- a/audio/coreaudio.c
> +++ b/audio/coreaudio.c
> @@ -56,7 +56,7 @@ typedef struct coreaudioVoiceOut {
>
>   static void coreaudio_logstatus (OSStatus status)
>   {
> -    char *str = "BUG";
> +    const char *str = "BUG";
>
>       switch(status) {
>       case kAudioHardwareNoError:
>    

Acked-by: Stefan Weil <weil@mail.berlios.de>
Andreas Färber May 29, 2011, 3:02 p.m. UTC | #2
Am 27.05.2011 um 19:42 schrieb Stefan Weil:

> Am 27.05.2011 19:22, schrieb Alexandre Raymond:
>> In audio/coreaudio.c, a variable named "str" was assigned "const  
>> char" values,
>> which resulted in the following warnings:
>>
>> -----8<-----
>> audio/coreaudio.c: In function ‘coreaudio_logstatus’:
>> audio/coreaudio.c:59: warning: initialization discards qualifiers  
>> from pointer target type
>> audio/coreaudio.c:63: warning: assignment discards qualifiers from  
>> pointer target type
>> (...)
>> -----8<-----
>>
>> Signed-off-by: Alexandre Raymond<cerbere@gmail.com>
>> ---
>>  audio/coreaudio.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/audio/coreaudio.c b/audio/coreaudio.c
>> index 0a26413..3bd75cd 100644
>> --- a/audio/coreaudio.c
>> +++ b/audio/coreaudio.c
>> @@ -56,7 +56,7 @@ typedef struct coreaudioVoiceOut {
>>
>>  static void coreaudio_logstatus (OSStatus status)
>>  {
>> -    char *str = "BUG";
>> +    const char *str = "BUG";
>>
>>      switch(status) {
>>      case kAudioHardwareNoError:
>>
>
> Acked-by: Stefan Weil <weil@mail.berlios.de>

Thanks, applied to the cocoa branch.

Andreas
diff mbox

Patch

diff --git a/audio/coreaudio.c b/audio/coreaudio.c
index 0a26413..3bd75cd 100644
--- a/audio/coreaudio.c
+++ b/audio/coreaudio.c
@@ -56,7 +56,7 @@  typedef struct coreaudioVoiceOut {
 
 static void coreaudio_logstatus (OSStatus status)
 {
-    char *str = "BUG";
+    const char *str = "BUG";
 
     switch(status) {
     case kAudioHardwareNoError: