From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] Add extra const to FF_PFNGLSHADERSOURCEPROC.
Date: Sat, 1 Jun 2024 02:30:49 +0200
Message-ID: <AS8P250MB0744FD8BF16EC490BE7530BE8FFD2@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <BN7PR21MB16363C6C0288A64BE59F1BDDCBFC2@BN7PR21MB1636.namprd21.prod.outlook.com>
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".
next prev parent reply other threads:[~2024-06-01 0:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-31 19:08 Billy O'Neal (VC AIR) via ffmpeg-devel
2024-06-01 0:30 ` Andreas Rheinhardt [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AS8P250MB0744FD8BF16EC490BE7530BE8FFD2@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM \
--to=andreas.rheinhardt@outlook.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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