* [FFmpeg-devel] [PATCH] Add extra const to FF_PFNGLSHADERSOURCEPROC.
@ 2024-05-31 19:08 Billy O'Neal (VC AIR) via ffmpeg-devel
2024-06-01 0:30 ` Andreas Rheinhardt
0 siblings, 1 reply; 7+ messages in thread
From: Billy O'Neal (VC AIR) via ffmpeg-devel @ 2024-05-31 19:08 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Billy O'Neal (VC AIR)
Resolves the following compiler error on macOS 14.5:
```console
/Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/OpenGL.framework/Headers/gl3.h:1891:21: note: 'glShaderSource' has been explicitly marked deprecated here
GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const *string, const GLint *length) OPENGL_DEPRECATED(10.5, 10.14);
^
src/libavdevice/opengl_enc.c:482:27: error: incompatible function pointer types assigning to 'FF_PFNGLSHADERSOURCEPROC' (aka 'void (*)(unsigned int, int, const char **, const int *)') from 'void (GLuint, GLsizei, const GLchar *const *, const GLint *)' (aka 'void (unsigned int, int, const char *const *, const int *)') [-Wincompatible-function-pointer-types]
procs->glShaderSource = glShaderSource;
^ ~~~~~~~~~~~~~~
```
Signed-off-by: Billy Robert O'Neal III <bion@microsoft.com>
---
libavdevice/opengl_enc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c
index 6f7a30ff9e..691bee22ad 100644
--- a/libavdevice/opengl_enc.c
+++ b/libavdevice/opengl_enc.c
@@ -117,7 +117,7 @@ typedef void (APIENTRY *FF_PFNGLATTACHSHADERPROC) (GLuint program, GLuint shad
typedef GLuint (APIENTRY *FF_PFNGLCREATESHADERPROC) (GLenum type);
typedef void (APIENTRY *FF_PFNGLDELETESHADERPROC) (GLuint shader);
typedef void (APIENTRY *FF_PFNGLCOMPILESHADERPROC) (GLuint shader);
-typedef void (APIENTRY *FF_PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const char* *string, const GLint *length);
+typedef void (APIENTRY *FF_PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const char* const *string, const GLint *length);
typedef void (APIENTRY *FF_PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
typedef void (APIENTRY *FF_PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, char *infoLog);
--
2.39.3 (Apple Git-146)
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [FFmpeg-devel] [PATCH] Add extra const to FF_PFNGLSHADERSOURCEPROC.
2024-05-31 19:08 [FFmpeg-devel] [PATCH] Add extra const to FF_PFNGLSHADERSOURCEPROC Billy O'Neal (VC AIR) via ffmpeg-devel
@ 2024-06-01 0:30 ` Andreas Rheinhardt
2024-06-03 15:51 ` Billy O'Neal (VC AIR) via ffmpeg-devel
0 siblings, 1 reply; 7+ messages in thread
From: Andreas Rheinhardt @ 2024-06-01 0:30 UTC (permalink / raw)
To: ffmpeg-devel
Billy O'Neal (VC AIR) via ffmpeg-devel:
> Resolves the following compiler error on macOS 14.5:
>
> ```console
> /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/OpenGL.framework/Headers/gl3.h:1891:21: note: 'glShaderSource' has been explicitly marked deprecated here
> GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const *string, const GLint *length) OPENGL_DEPRECATED(10.5, 10.14);
> ^
> src/libavdevice/opengl_enc.c:482:27: error: incompatible function pointer types assigning to 'FF_PFNGLSHADERSOURCEPROC' (aka 'void (*)(unsigned int, int, const char **, const int *)') from 'void (GLuint, GLsizei, const GLchar *const *, const GLint *)' (aka 'void (unsigned int, int, const char *const *, const int *)') [-Wincompatible-function-pointer-types]
> procs->glShaderSource = glShaderSource;
> ^ ~~~~~~~~~~~~~~
> ```
>
> Signed-off-by: Billy Robert O'Neal III <bion@microsoft.com>
> ---
> libavdevice/opengl_enc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c
> index 6f7a30ff9e..691bee22ad 100644
> --- a/libavdevice/opengl_enc.c
> +++ b/libavdevice/opengl_enc.c
> @@ -117,7 +117,7 @@ typedef void (APIENTRY *FF_PFNGLATTACHSHADERPROC) (GLuint program, GLuint shad
> typedef GLuint (APIENTRY *FF_PFNGLCREATESHADERPROC) (GLenum type);
> typedef void (APIENTRY *FF_PFNGLDELETESHADERPROC) (GLuint shader);
> typedef void (APIENTRY *FF_PFNGLCOMPILESHADERPROC) (GLuint shader);
> -typedef void (APIENTRY *FF_PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const char* *string, const GLint *length);
> +typedef void (APIENTRY *FF_PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const char* const *string, const GLint *length);
> typedef void (APIENTRY *FF_PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
> typedef void (APIENTRY *FF_PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, char *infoLog);
>
It seems that the extra const is apple-only, so this patch should be
restricted to it.
- Andreas
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [FFmpeg-devel] [PATCH] Add extra const to FF_PFNGLSHADERSOURCEPROC.
2024-06-01 0:30 ` Andreas Rheinhardt
@ 2024-06-03 15:51 ` Billy O'Neal (VC AIR) via ffmpeg-devel
2024-06-03 22:08 ` Andreas Rheinhardt
0 siblings, 1 reply; 7+ messages in thread
From: Billy O'Neal (VC AIR) via ffmpeg-devel @ 2024-06-03 15:51 UTC (permalink / raw)
To: FFmpeg development discussions and patches; +Cc: Billy O'Neal (VC AIR)
Assigning the non-const version to the const version is valid (at least, builds on other platforms succeeded).
Would you still like Apple guards? (I'm hesitating only because most upstreams ask for minimal preprocessor use)
Thanks for the consideration!
Get Outlook for Android<https://aka.ms/AAb9ysg>
________________________________
From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> on behalf of Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Sent: Friday, May 31, 2024 5:30:49 PM
To: ffmpeg-devel@ffmpeg.org <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] Add extra const to FF_PFNGLSHADERSOURCEPROC.
[You don't often get email from andreas.rheinhardt@outlook.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
Billy O'Neal (VC AIR) via ffmpeg-devel:
> Resolves the following compiler error on macOS 14.5:
>
> ```console
> /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/OpenGL.framework/Headers/gl3.h:1891:21: note: 'glShaderSource' has been explicitly marked deprecated here
> GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const *string, const GLint *length) OPENGL_DEPRECATED(10.5, 10.14);
> ^
> src/libavdevice/opengl_enc.c:482:27: error: incompatible function pointer types assigning to 'FF_PFNGLSHADERSOURCEPROC' (aka 'void (*)(unsigned int, int, const char **, const int *)') from 'void (GLuint, GLsizei, const GLchar *const *, const GLint *)' (aka 'void (unsigned int, int, const char *const *, const int *)') [-Wincompatible-function-pointer-types]
> procs->glShaderSource = glShaderSource;
> ^ ~~~~~~~~~~~~~~
> ```
>
> Signed-off-by: Billy Robert O'Neal III <bion@microsoft.com>
> ---
> libavdevice/opengl_enc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c
> index 6f7a30ff9e..691bee22ad 100644
> --- a/libavdevice/opengl_enc.c
> +++ b/libavdevice/opengl_enc.c
> @@ -117,7 +117,7 @@ typedef void (APIENTRY *FF_PFNGLATTACHSHADERPROC) (GLuint program, GLuint shad
> typedef GLuint (APIENTRY *FF_PFNGLCREATESHADERPROC) (GLenum type);
> typedef void (APIENTRY *FF_PFNGLDELETESHADERPROC) (GLuint shader);
> typedef void (APIENTRY *FF_PFNGLCOMPILESHADERPROC) (GLuint shader);
> -typedef void (APIENTRY *FF_PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const char* *string, const GLint *length);
> +typedef void (APIENTRY *FF_PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const char* const *string, const GLint *length);
> typedef void (APIENTRY *FF_PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
> typedef void (APIENTRY *FF_PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, char *infoLog);
>
It seems that the extra const is apple-only, so this patch should be
restricted to it.
- Andreas
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fffmpeg.org%2Fmailman%2Flistinfo%2Fffmpeg-devel&data=05%7C02%7Cbion%40microsoft.com%7C27bd60fa36b84575501e08dc81d21fa9%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638527986685274201%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=YErh%2BSO4tliFq2fkkncCsj%2BwfWAhX6n2Oilt0Jnld2c%3D&reserved=0<https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [FFmpeg-devel] [PATCH] Add extra const to FF_PFNGLSHADERSOURCEPROC.
2024-06-03 15:51 ` Billy O'Neal (VC AIR) via ffmpeg-devel
@ 2024-06-03 22:08 ` Andreas Rheinhardt
2024-06-05 0:30 ` Billy O'Neal (VC AIR) via ffmpeg-devel
0 siblings, 1 reply; 7+ messages in thread
From: Andreas Rheinhardt @ 2024-06-03 22:08 UTC (permalink / raw)
To: ffmpeg-devel
Billy O'Neal (VC AIR) via ffmpeg-devel:
> Assigning the non-const version to the const version is valid (at least, builds on other platforms succeeded).
>
It is not valid: "If a converted pointer is used to call a function
whose type is not compatible with the referenced type, the behavior is
undefined." (C11 6.3.2.3 (8))
It will mostly work, because there is no problem from an ABI point of
view. But it is nevertheless undefined behaviour (and recent version's
of Clang's undefined behavior sanitizer actually check for such mismatches).
> Would you still like Apple guards? (I'm hesitating only because most upstreams ask for minimal preprocessor use)
>
> Thanks for the consideration!
>
> Get Outlook for Android<https://aka.ms/AAb9ysg>
> ________________________________
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> on behalf of Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> Sent: Friday, May 31, 2024 5:30:49 PM
> To: ffmpeg-devel@ffmpeg.org <ffmpeg-devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH] Add extra const to FF_PFNGLSHADERSOURCEPROC.
>
> [You don't often get email from andreas.rheinhardt@outlook.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> Billy O'Neal (VC AIR) via ffmpeg-devel:
>> Resolves the following compiler error on macOS 14.5:
>>
>> ```console
>> /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/OpenGL.framework/Headers/gl3.h:1891:21: note: 'glShaderSource' has been explicitly marked deprecated here
>> GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const *string, const GLint *length) OPENGL_DEPRECATED(10.5, 10.14);
>> ^
>> src/libavdevice/opengl_enc.c:482:27: error: incompatible function pointer types assigning to 'FF_PFNGLSHADERSOURCEPROC' (aka 'void (*)(unsigned int, int, const char **, const int *)') from 'void (GLuint, GLsizei, const GLchar *const *, const GLint *)' (aka 'void (unsigned int, int, const char *const *, const int *)') [-Wincompatible-function-pointer-types]
>> procs->glShaderSource = glShaderSource;
>> ^ ~~~~~~~~~~~~~~
>> ```
>>
>> Signed-off-by: Billy Robert O'Neal III <bion@microsoft.com>
>> ---
>> libavdevice/opengl_enc.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c
>> index 6f7a30ff9e..691bee22ad 100644
>> --- a/libavdevice/opengl_enc.c
>> +++ b/libavdevice/opengl_enc.c
>> @@ -117,7 +117,7 @@ typedef void (APIENTRY *FF_PFNGLATTACHSHADERPROC) (GLuint program, GLuint shad
>> typedef GLuint (APIENTRY *FF_PFNGLCREATESHADERPROC) (GLenum type);
>> typedef void (APIENTRY *FF_PFNGLDELETESHADERPROC) (GLuint shader);
>> typedef void (APIENTRY *FF_PFNGLCOMPILESHADERPROC) (GLuint shader);
>> -typedef void (APIENTRY *FF_PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const char* *string, const GLint *length);
>> +typedef void (APIENTRY *FF_PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const char* const *string, const GLint *length);
>> typedef void (APIENTRY *FF_PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
>> typedef void (APIENTRY *FF_PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, char *infoLog);
>>
>
> It seems that the extra const is apple-only, so this patch should be
> restricted to it.
>
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [FFmpeg-devel] [PATCH] Add extra const to FF_PFNGLSHADERSOURCEPROC.
2024-06-03 22:08 ` Andreas Rheinhardt
@ 2024-06-05 0:30 ` Billy O'Neal (VC AIR) via ffmpeg-devel
0 siblings, 0 replies; 7+ messages in thread
From: Billy O'Neal (VC AIR) via ffmpeg-devel @ 2024-06-05 0:30 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Billy O'Neal (VC AIR)
Makes sense. I'm validating that a patch with the #ifdef succeeds and will attempt to add it as a reply if that works. I apologize for my misunderstanding of the situation, and the horrible Outlook signature. (And in advance if my git format-patch use afterwards accidentally makes a new thread rather than attaching it to this one)
Thanks again for the feedback and consideration,
Billy O'Neal
Visual C++ - vcpkg
I believed that
void f(GLuint shader, GLsizei count, const char**string, const GLint *length);
was compatible with
void f(GLuint shader, GLsizei count, const char* const*string, const GLint *length);
based largely on that assignment succeeding everywhere, but I was mistaken. See C11 6.7.6.3 "Function declarators (including prototypes)"/15:
> Moreover, the parameter type lists, if both are present, shall agree in the number of
> parameters and in use of the ellipsis terminator; corresponding parameters shall have
> compatible types.
OK, so this reduces to "is const char** compatible with const char* const *"
6.7.6.1 "Pointer declarators"/2:
>For two pointer types to be compatible, both shall be identically qualified and both shall
>be pointers to compatible types.
Validation build running: https://github.com/microsoft/vcpkg/pull/39132/
________________________________
From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> on behalf of Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Sent: Monday, June 3, 2024 3:08 PM
To: ffmpeg-devel@ffmpeg.org <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] Add extra const to FF_PFNGLSHADERSOURCEPROC.
Billy O'Neal (VC AIR) via ffmpeg-devel:
> Assigning the non-const version to the const version is valid (at least, builds on other platforms succeeded).
>
It is not valid: "If a converted pointer is used to call a function
whose type is not compatible with the referenced type, the behavior is
undefined." (C11 6.3.2.3 (8))
It will mostly work, because there is no problem from an ABI point of
view. But it is nevertheless undefined behaviour (and recent version's
of Clang's undefined behavior sanitizer actually check for such mismatches).
> Would you still like Apple guards? (I'm hesitating only because most upstreams ask for minimal preprocessor use)
>
> Thanks for the consideration!
>
> ________________________________
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> on behalf of Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> Sent: Friday, May 31, 2024 5:30:49 PM
> To: ffmpeg-devel@ffmpeg.org <ffmpeg-devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH] Add extra const to FF_PFNGLSHADERSOURCEPROC.
>
> [You don't often get email from andreas.rheinhardt@outlook.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> Billy O'Neal (VC AIR) via ffmpeg-devel:
>> Resolves the following compiler error on macOS 14.5:
>>
>> ```console
>> /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/OpenGL.framework/Headers/gl3.h:1891:21: note: 'glShaderSource' has been explicitly marked deprecated here
>> GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const *string, const GLint *length) OPENGL_DEPRECATED(10.5, 10.14);
>> ^
>> src/libavdevice/opengl_enc.c:482:27: error: incompatible function pointer types assigning to 'FF_PFNGLSHADERSOURCEPROC' (aka 'void (*)(unsigned int, int, const char **, const int *)') from 'void (GLuint, GLsizei, const GLchar *const *, const GLint *)' (aka 'void (unsigned int, int, const char *const *, const int *)') [-Wincompatible-function-pointer-types]
>> procs->glShaderSource = glShaderSource;
>> ^ ~~~~~~~~~~~~~~
>> ```
>>
>> Signed-off-by: Billy Robert O'Neal III <bion@microsoft.com>
>> ---
>> libavdevice/opengl_enc.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c
>> index 6f7a30ff9e..691bee22ad 100644
>> --- a/libavdevice/opengl_enc.c
>> +++ b/libavdevice/opengl_enc.c
>> @@ -117,7 +117,7 @@ typedef void (APIENTRY *FF_PFNGLATTACHSHADERPROC) (GLuint program, GLuint shad
>> typedef GLuint (APIENTRY *FF_PFNGLCREATESHADERPROC) (GLenum type);
>> typedef void (APIENTRY *FF_PFNGLDELETESHADERPROC) (GLuint shader);
>> typedef void (APIENTRY *FF_PFNGLCOMPILESHADERPROC) (GLuint shader);
>> -typedef void (APIENTRY *FF_PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const char* *string, const GLint *length);
>> +typedef void (APIENTRY *FF_PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const char* const *string, const GLint *length);
>> typedef void (APIENTRY *FF_PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
>> typedef void (APIENTRY *FF_PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, char *infoLog);
>>
>
> It seems that the extra const is apple-only, so this patch should be
> restricted to it.
>
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [FFmpeg-devel] [PATCH] Add extra const to FF_PFNGLSHADERSOURCEPROC.
2024-06-05 3:39 Billy O'Neal (VC AIR) via ffmpeg-devel
@ 2024-06-10 21:14 ` Billy O'Neal (VC AIR) via ffmpeg-devel
0 siblings, 0 replies; 7+ messages in thread
From: Billy O'Neal (VC AIR) via ffmpeg-devel @ 2024-06-10 21:14 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Billy O'Neal (VC AIR)
Hi there folks!
I double checked patchwork and it looks like it's still showing the first version of this patch, before I applied suggestions from Andreas Rheinhardt . Should I resend with a different subject line or is there something else I specifically broke?
Thanks again!
Billy O'Neal
Visual C++ - vcpkg
________________________________
From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> on behalf of Billy O'Neal (VC AIR) via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
Sent: Tuesday, June 4, 2024 8:39 PM
To: ffmpeg-devel@ffmpeg.org <ffmpeg-devel@ffmpeg.org>
Cc: Billy O'Neal (VC AIR) <bion@microsoft.com>
Subject: Re: [FFmpeg-devel] [PATCH] Add extra const to FF_PFNGLSHADERSOURCEPROC.
Resolves the following compiler error on macOS 14.5:
```console
/Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/OpenGL.framework/Headers/gl3.h:1891:21: note: 'glShaderSource' has been explicitly marked deprecated here
GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const *string, const GLint *length) OPENGL_DEPRECATED(10.5, 10.14);
^
src/libavdevice/opengl_enc.c:482:27: error: incompatible function pointer types assigning to 'FF_PFNGLSHADERSOURCEPROC' (aka 'void (*)(unsigned int, int, const char **, const int *)') from 'void (GLuint, GLsizei, const GLchar *const *, const GLint *)' (aka 'void (unsigned int, int, const char *const *, const int *)') [-Wincompatible-function-pointer-types]
procs->glShaderSource = glShaderSource;
^ ~~~~~~~~~~~~~~
```
Signed-off-by: Billy Robert O'Neal III <bion@microsoft.com>
---
libavdevice/opengl_enc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c
index 6f7a30ff9e..7805b641d1 100644
--- a/libavdevice/opengl_enc.c
+++ b/libavdevice/opengl_enc.c
@@ -117,7 +117,11 @@ typedef void (APIENTRY *FF_PFNGLATTACHSHADERPROC) (GLuint program, GLuint shad
typedef GLuint (APIENTRY *FF_PFNGLCREATESHADERPROC) (GLenum type);
typedef void (APIENTRY *FF_PFNGLDELETESHADERPROC) (GLuint shader);
typedef void (APIENTRY *FF_PFNGLCOMPILESHADERPROC) (GLuint shader);
+#if defined(__APPLE__)
+typedef void (APIENTRY *FF_PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const char* const *string, const GLint *length);
+#else
typedef void (APIENTRY *FF_PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const char* *string, const GLint *length);
+#endif
typedef void (APIENTRY *FF_PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
typedef void (APIENTRY *FF_PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, char *infoLog);
--
2.45.2.windows.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fffmpeg.org%2Fmailman%2Flistinfo%2Fffmpeg-devel&data=05%7C02%7Cbion%40microsoft.com%7Ce68dc19582364880041908dc85111878%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638531555682645982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=uakgyRGMTFxgBQgMH6tXFGnrVY%2BFzcUPa7NMqWnyEpU%3D&reserved=0<https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [FFmpeg-devel] [PATCH] Add extra const to FF_PFNGLSHADERSOURCEPROC.
@ 2024-06-05 3:39 Billy O'Neal (VC AIR) via ffmpeg-devel
2024-06-10 21:14 ` Billy O'Neal (VC AIR) via ffmpeg-devel
0 siblings, 1 reply; 7+ messages in thread
From: Billy O'Neal (VC AIR) via ffmpeg-devel @ 2024-06-05 3:39 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Billy O'Neal (VC AIR)
Resolves the following compiler error on macOS 14.5:
```console
/Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/System/Library/Frameworks/OpenGL.framework/Headers/gl3.h:1891:21: note: 'glShaderSource' has been explicitly marked deprecated here
GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const *string, const GLint *length) OPENGL_DEPRECATED(10.5, 10.14);
^
src/libavdevice/opengl_enc.c:482:27: error: incompatible function pointer types assigning to 'FF_PFNGLSHADERSOURCEPROC' (aka 'void (*)(unsigned int, int, const char **, const int *)') from 'void (GLuint, GLsizei, const GLchar *const *, const GLint *)' (aka 'void (unsigned int, int, const char *const *, const int *)') [-Wincompatible-function-pointer-types]
procs->glShaderSource = glShaderSource;
^ ~~~~~~~~~~~~~~
```
Signed-off-by: Billy Robert O'Neal III <bion@microsoft.com>
---
libavdevice/opengl_enc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c
index 6f7a30ff9e..7805b641d1 100644
--- a/libavdevice/opengl_enc.c
+++ b/libavdevice/opengl_enc.c
@@ -117,7 +117,11 @@ typedef void (APIENTRY *FF_PFNGLATTACHSHADERPROC) (GLuint program, GLuint shad
typedef GLuint (APIENTRY *FF_PFNGLCREATESHADERPROC) (GLenum type);
typedef void (APIENTRY *FF_PFNGLDELETESHADERPROC) (GLuint shader);
typedef void (APIENTRY *FF_PFNGLCOMPILESHADERPROC) (GLuint shader);
+#if defined(__APPLE__)
+typedef void (APIENTRY *FF_PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const char* const *string, const GLint *length);
+#else
typedef void (APIENTRY *FF_PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const char* *string, const GLint *length);
+#endif
typedef void (APIENTRY *FF_PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
typedef void (APIENTRY *FF_PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, char *infoLog);
--
2.45.2.windows.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-06-10 21:14 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-31 19:08 [FFmpeg-devel] [PATCH] Add extra const to FF_PFNGLSHADERSOURCEPROC Billy O'Neal (VC AIR) via ffmpeg-devel
2024-06-01 0:30 ` Andreas Rheinhardt
2024-06-03 15:51 ` Billy O'Neal (VC AIR) via ffmpeg-devel
2024-06-03 22:08 ` Andreas Rheinhardt
2024-06-05 0:30 ` Billy O'Neal (VC AIR) via ffmpeg-devel
2024-06-05 3:39 Billy O'Neal (VC AIR) via ffmpeg-devel
2024-06-10 21:14 ` Billy O'Neal (VC AIR) via ffmpeg-devel
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git