[PATCH 2/2] winegstreamer: Make some strings static constants.

Andrew Eikum aeikum at codeweavers.com
Fri Nov 18 09:18:31 CST 2016


This adds a bunch of warnings for me:

main.c:69:9: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 {   {   wNull,

main.c:273:17: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
         argv[0] = argv0;
                 ^
main.c:274:17: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
         argv[1] = argv1;

Andrew

On Thu, Nov 17, 2016 at 08:46:38AM -0700, Alex Henrie wrote:
> Cc: Andrew Eikum <aeikum at codeweavers.com>
> 
> Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
> ---
>  dlls/winegstreamer/main.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c
> index 2bb69f4..6c49572 100644
> --- a/dlls/winegstreamer/main.c
> +++ b/dlls/winegstreamer/main.c
> @@ -52,7 +52,7 @@ static const WCHAR wGstreamer_Mp3[] =
>  static const WCHAR wGstreamer_AudioConvert[] =
>  {'G','S','t','r','e','a','m','e','r',' ','A','u','d','i','o','C','o','n','v','e','r','t',' ','f','i','l','t','e','r',0};
>  
> -static WCHAR wNull[] = {'\0'};
> +static const WCHAR wNull[] = {'\0'};
>  
>  static const AMOVIESETUP_MEDIATYPE amfMTstream[] =
>  {   { &MEDIATYPE_Stream, &WINESUBTYPE_Gstreamer },
> @@ -262,8 +262,8 @@ DWORD Gstreamer_init(void)
>      static int inited;
>  
>      if (!inited) {
> -        char argv0[] = "wine";
> -        char argv1[] = "--gst-disable-registry-fork";
> +        static const char argv0[] = "wine";
> +        static const char argv1[] = "--gst-disable-registry-fork";
>          char **argv = HeapAlloc(GetProcessHeap(), 0, sizeof(char *)*3);
>          int argc = 2;
>          GError *err = NULL;
> -- 
> 2.10.2
> 



More information about the wine-devel mailing list