* [FFmpeg-devel] [PATCH 1/4] avcodec/cbs_h266: Remove double ;
@ 2023-06-29 18:17 Andreas Rheinhardt
2023-06-29 18:18 ` James Almer
` (3 more replies)
0 siblings, 4 replies; 14+ messages in thread
From: Andreas Rheinhardt @ 2023-06-29 18:17 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
Fixes a warning from GCC when in pedantic mode:
"extra semicolon in struct or union specified"
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavcodec/cbs_h266.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/cbs_h266.h b/libavcodec/cbs_h266.h
index 8548e501c0..03dfd4a954 100644
--- a/libavcodec/cbs_h266.h
+++ b/libavcodec/cbs_h266.h
@@ -80,7 +80,7 @@ typedef struct H266GeneralConstraintsInfo {
/* inter */
uint8_t gci_no_ref_pic_resampling_constraint_flag;
- uint8_t gci_no_res_change_in_clvs_constraint_flag;;
+ uint8_t gci_no_res_change_in_clvs_constraint_flag;
uint8_t gci_no_weighted_prediction_constraint_flag;
uint8_t gci_no_ref_wraparound_constraint_flag;
uint8_t gci_no_temporal_mvp_constraint_flag;
@@ -211,7 +211,7 @@ typedef struct H266RawVUI {
uint8_t vui_aspect_ratio_idc;
uint16_t vui_sar_width;
- uint16_t vui_sar_height;;
+ uint16_t vui_sar_height;
uint8_t vui_overscan_info_present_flag;
uint8_t vui_overscan_appropriate_flag;
--
2.34.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] 14+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/4] avcodec/cbs_h266: Remove double ;
2023-06-29 18:17 [FFmpeg-devel] [PATCH 1/4] avcodec/cbs_h266: Remove double ; Andreas Rheinhardt
@ 2023-06-29 18:18 ` James Almer
2023-06-29 18:20 ` Andreas Rheinhardt
2023-06-29 18:19 ` [FFmpeg-devel] [PATCH 2/4] avcodec/vvc_parser: Constify parser Andreas Rheinhardt
` (2 subsequent siblings)
3 siblings, 1 reply; 14+ messages in thread
From: James Almer @ 2023-06-29 18:18 UTC (permalink / raw)
To: ffmpeg-devel
On 6/29/2023 3:17 PM, Andreas Rheinhardt wrote:
> Fixes a warning from GCC when in pedantic mode:
> "extra semicolon in struct or union specified"
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
> libavcodec/cbs_h266.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavcodec/cbs_h266.h b/libavcodec/cbs_h266.h
> index 8548e501c0..03dfd4a954 100644
> --- a/libavcodec/cbs_h266.h
> +++ b/libavcodec/cbs_h266.h
> @@ -80,7 +80,7 @@ typedef struct H266GeneralConstraintsInfo {
>
> /* inter */
> uint8_t gci_no_ref_pic_resampling_constraint_flag;
> - uint8_t gci_no_res_change_in_clvs_constraint_flag;;
> + uint8_t gci_no_res_change_in_clvs_constraint_flag;
> uint8_t gci_no_weighted_prediction_constraint_flag;
> uint8_t gci_no_ref_wraparound_constraint_flag;
> uint8_t gci_no_temporal_mvp_constraint_flag;
> @@ -211,7 +211,7 @@ typedef struct H266RawVUI {
> uint8_t vui_aspect_ratio_idc;
>
> uint16_t vui_sar_width;
> - uint16_t vui_sar_height;;
> + uint16_t vui_sar_height;
>
> uint8_t vui_overscan_info_present_flag;
> uint8_t vui_overscan_appropriate_flag;
LGTM. This should also fix a compilation failure with msvc, which seems
to be pretty strict about this.
http://fate.ffmpeg.org/report.cgi?time=20230629174305&slot=x86_64-msvc17-windows-native
_______________________________________________
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] 14+ messages in thread
* [FFmpeg-devel] [PATCH 2/4] avcodec/vvc_parser: Constify parser
2023-06-29 18:17 [FFmpeg-devel] [PATCH 1/4] avcodec/cbs_h266: Remove double ; Andreas Rheinhardt
2023-06-29 18:18 ` James Almer
@ 2023-06-29 18:19 ` Andreas Rheinhardt
2023-06-29 18:19 ` James Almer
2023-06-29 18:19 ` [FFmpeg-devel] [PATCH 3/4] avfilter/vf_ccrepack: Constify filter Andreas Rheinhardt
2023-06-29 18:19 ` [FFmpeg-devel] [PATCH 4/4] avformat/ac4dec: Constify demuxer Andreas Rheinhardt
3 siblings, 1 reply; 14+ messages in thread
From: Andreas Rheinhardt @ 2023-06-29 18:19 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
The discrepancy between the definition and the declaration
in parsers.c is actually UB.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavcodec/vvc_parser.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/vvc_parser.c b/libavcodec/vvc_parser.c
index 4f7657f7ab..f350fe70a9 100644
--- a/libavcodec/vvc_parser.c
+++ b/libavcodec/vvc_parser.c
@@ -571,7 +571,7 @@ static void vvc_parser_close(AVCodecParserContext *s)
av_freep(&ctx->pc.buffer);
}
-AVCodecParser ff_vvc_parser = {
+const AVCodecParser ff_vvc_parser = {
.codec_ids = { AV_CODEC_ID_VVC },
.priv_data_size = sizeof(VVCParserContext),
.parser_init = vvc_parser_init,
--
2.34.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] 14+ messages in thread
* [FFmpeg-devel] [PATCH 3/4] avfilter/vf_ccrepack: Constify filter
2023-06-29 18:17 [FFmpeg-devel] [PATCH 1/4] avcodec/cbs_h266: Remove double ; Andreas Rheinhardt
2023-06-29 18:18 ` James Almer
2023-06-29 18:19 ` [FFmpeg-devel] [PATCH 2/4] avcodec/vvc_parser: Constify parser Andreas Rheinhardt
@ 2023-06-29 18:19 ` Andreas Rheinhardt
2023-06-29 18:19 ` James Almer
2023-06-29 19:18 ` Paul B Mahol
2023-06-29 18:19 ` [FFmpeg-devel] [PATCH 4/4] avformat/ac4dec: Constify demuxer Andreas Rheinhardt
3 siblings, 2 replies; 14+ messages in thread
From: Andreas Rheinhardt @ 2023-06-29 18:19 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
The discrepancy between the definition and the declaration
in allfilters.c is actually UB.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavfilter/vf_ccrepack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/vf_ccrepack.c b/libavfilter/vf_ccrepack.c
index 61eb2128ae..950bb7b528 100644
--- a/libavfilter/vf_ccrepack.c
+++ b/libavfilter/vf_ccrepack.c
@@ -92,7 +92,7 @@ static const AVFilterPad avfilter_vf_ccrepack_outputs[] = {
},
};
-AVFilter ff_vf_ccrepack = {
+const AVFilter ff_vf_ccrepack = {
.name = "ccrepack",
.description = NULL_IF_CONFIG_SMALL("Repack CEA-708 closed caption metadata"),
.uninit = uninit,
--
2.34.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] 14+ messages in thread
* [FFmpeg-devel] [PATCH 4/4] avformat/ac4dec: Constify demuxer
2023-06-29 18:17 [FFmpeg-devel] [PATCH 1/4] avcodec/cbs_h266: Remove double ; Andreas Rheinhardt
` (2 preceding siblings ...)
2023-06-29 18:19 ` [FFmpeg-devel] [PATCH 3/4] avfilter/vf_ccrepack: Constify filter Andreas Rheinhardt
@ 2023-06-29 18:19 ` Andreas Rheinhardt
3 siblings, 0 replies; 14+ messages in thread
From: Andreas Rheinhardt @ 2023-06-29 18:19 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
The discrepancy between the definition and the declaration
in allformats.c is actually UB.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
Will apply this patchset soon.
libavformat/ac4dec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/ac4dec.c b/libavformat/ac4dec.c
index eb7bbaa655..71950f52dc 100644
--- a/libavformat/ac4dec.c
+++ b/libavformat/ac4dec.c
@@ -93,7 +93,7 @@ static int ac4_read_packet(AVFormatContext *s, AVPacket *pkt)
return ret;
}
-AVInputFormat ff_ac4_demuxer = {
+const AVInputFormat ff_ac4_demuxer = {
.name = "ac4",
.long_name = NULL_IF_CONFIG_SMALL("raw AC-4"),
.read_probe = ac4_probe,
--
2.34.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] 14+ messages in thread
* Re: [FFmpeg-devel] [PATCH 2/4] avcodec/vvc_parser: Constify parser
2023-06-29 18:19 ` [FFmpeg-devel] [PATCH 2/4] avcodec/vvc_parser: Constify parser Andreas Rheinhardt
@ 2023-06-29 18:19 ` James Almer
0 siblings, 0 replies; 14+ messages in thread
From: James Almer @ 2023-06-29 18:19 UTC (permalink / raw)
To: ffmpeg-devel
On 6/29/2023 3:19 PM, Andreas Rheinhardt wrote:
> The discrepancy between the definition and the declaration
> in parsers.c is actually UB.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
> libavcodec/vvc_parser.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/vvc_parser.c b/libavcodec/vvc_parser.c
> index 4f7657f7ab..f350fe70a9 100644
> --- a/libavcodec/vvc_parser.c
> +++ b/libavcodec/vvc_parser.c
> @@ -571,7 +571,7 @@ static void vvc_parser_close(AVCodecParserContext *s)
> av_freep(&ctx->pc.buffer);
> }
>
> -AVCodecParser ff_vvc_parser = {
> +const AVCodecParser ff_vvc_parser = {
> .codec_ids = { AV_CODEC_ID_VVC },
> .priv_data_size = sizeof(VVCParserContext),
> .parser_init = vvc_parser_init,
LGTM.
_______________________________________________
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] 14+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/4] avfilter/vf_ccrepack: Constify filter
2023-06-29 18:19 ` [FFmpeg-devel] [PATCH 3/4] avfilter/vf_ccrepack: Constify filter Andreas Rheinhardt
@ 2023-06-29 18:19 ` James Almer
2023-06-29 19:18 ` Paul B Mahol
1 sibling, 0 replies; 14+ messages in thread
From: James Almer @ 2023-06-29 18:19 UTC (permalink / raw)
To: ffmpeg-devel
On 6/29/2023 3:19 PM, Andreas Rheinhardt wrote:
> The discrepancy between the definition and the declaration
> in allfilters.c is actually UB.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
> libavfilter/vf_ccrepack.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavfilter/vf_ccrepack.c b/libavfilter/vf_ccrepack.c
> index 61eb2128ae..950bb7b528 100644
> --- a/libavfilter/vf_ccrepack.c
> +++ b/libavfilter/vf_ccrepack.c
> @@ -92,7 +92,7 @@ static const AVFilterPad avfilter_vf_ccrepack_outputs[] = {
> },
> };
>
> -AVFilter ff_vf_ccrepack = {
> +const AVFilter ff_vf_ccrepack = {
> .name = "ccrepack",
> .description = NULL_IF_CONFIG_SMALL("Repack CEA-708 closed caption metadata"),
> .uninit = uninit,
LGTM
_______________________________________________
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] 14+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/4] avcodec/cbs_h266: Remove double ;
2023-06-29 18:18 ` James Almer
@ 2023-06-29 18:20 ` Andreas Rheinhardt
0 siblings, 0 replies; 14+ messages in thread
From: Andreas Rheinhardt @ 2023-06-29 18:20 UTC (permalink / raw)
To: ffmpeg-devel
James Almer:
> On 6/29/2023 3:17 PM, Andreas Rheinhardt wrote:
>> Fixes a warning from GCC when in pedantic mode:
>> "extra semicolon in struct or union specified"
>>
>> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
>> ---
>> libavcodec/cbs_h266.h | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/libavcodec/cbs_h266.h b/libavcodec/cbs_h266.h
>> index 8548e501c0..03dfd4a954 100644
>> --- a/libavcodec/cbs_h266.h
>> +++ b/libavcodec/cbs_h266.h
>> @@ -80,7 +80,7 @@ typedef struct H266GeneralConstraintsInfo {
>> /* inter */
>> uint8_t gci_no_ref_pic_resampling_constraint_flag;
>> - uint8_t gci_no_res_change_in_clvs_constraint_flag;;
>> + uint8_t gci_no_res_change_in_clvs_constraint_flag;
>> uint8_t gci_no_weighted_prediction_constraint_flag;
>> uint8_t gci_no_ref_wraparound_constraint_flag;
>> uint8_t gci_no_temporal_mvp_constraint_flag;
>> @@ -211,7 +211,7 @@ typedef struct H266RawVUI {
>> uint8_t vui_aspect_ratio_idc;
>> uint16_t vui_sar_width;
>> - uint16_t vui_sar_height;;
>> + uint16_t vui_sar_height;
>> uint8_t vui_overscan_info_present_flag;
>> uint8_t vui_overscan_appropriate_flag;
>
> LGTM. This should also fix a compilation failure with msvc, which seems
> to be pretty strict about this.
> http://fate.ffmpeg.org/report.cgi?time=20230629174305&slot=x86_64-msvc17-windows-native
I'll amend the commit message and apply the patchset.
- 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] 14+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/4] avfilter/vf_ccrepack: Constify filter
2023-06-29 18:19 ` [FFmpeg-devel] [PATCH 3/4] avfilter/vf_ccrepack: Constify filter Andreas Rheinhardt
2023-06-29 18:19 ` James Almer
@ 2023-06-29 19:18 ` Paul B Mahol
2023-06-29 19:36 ` Andreas Rheinhardt
1 sibling, 1 reply; 14+ messages in thread
From: Paul B Mahol @ 2023-06-29 19:18 UTC (permalink / raw)
To: FFmpeg development discussions and patches; +Cc: Andreas Rheinhardt
On Thu, Jun 29, 2023 at 8:18 PM Andreas Rheinhardt <
andreas.rheinhardt@outlook.com> wrote:
> The discrepancy between the definition and the declaration
> in allfilters.c is actually UB.
>
I get no such message with ubsan.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
> libavfilter/vf_ccrepack.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavfilter/vf_ccrepack.c b/libavfilter/vf_ccrepack.c
> index 61eb2128ae..950bb7b528 100644
> --- a/libavfilter/vf_ccrepack.c
> +++ b/libavfilter/vf_ccrepack.c
> @@ -92,7 +92,7 @@ static const AVFilterPad avfilter_vf_ccrepack_outputs[]
> = {
> },
> };
>
> -AVFilter ff_vf_ccrepack = {
> +const AVFilter ff_vf_ccrepack = {
> .name = "ccrepack",
> .description = NULL_IF_CONFIG_SMALL("Repack CEA-708 closed caption
> metadata"),
> .uninit = uninit,
> --
> 2.34.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".
>
_______________________________________________
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] 14+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/4] avfilter/vf_ccrepack: Constify filter
2023-06-29 19:18 ` Paul B Mahol
@ 2023-06-29 19:36 ` Andreas Rheinhardt
2023-06-29 19:42 ` Paul B Mahol
0 siblings, 1 reply; 14+ messages in thread
From: Andreas Rheinhardt @ 2023-06-29 19:36 UTC (permalink / raw)
To: Paul B Mahol, FFmpeg development discussions and patches
Paul B Mahol:
> On Thu, Jun 29, 2023 at 8:18 PM Andreas Rheinhardt <
> andreas.rheinhardt@outlook.com> wrote:
>
>> The discrepancy between the definition and the declaration
>> in allfilters.c is actually UB.
>>
>
> I get no such message with ubsan.
>
UBSan is a runtime UB-detector, not a compile-time UB detector.
The earlier code is UB because of 6.2.7 (2) of C11: "All declarations
that refer to the same object or function shall have compatible type;
otherwise, the behavior is undefined." A type and its const-qualified
type are not compatible.
- 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] 14+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/4] avfilter/vf_ccrepack: Constify filter
2023-06-29 19:36 ` Andreas Rheinhardt
@ 2023-06-29 19:42 ` Paul B Mahol
2023-06-29 19:51 ` James Almer
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: Paul B Mahol @ 2023-06-29 19:42 UTC (permalink / raw)
To: Andreas Rheinhardt; +Cc: FFmpeg development discussions and patches
On Thu, Jun 29, 2023 at 9:35 PM Andreas Rheinhardt <
andreas.rheinhardt@outlook.com> wrote:
> Paul B Mahol:
> > On Thu, Jun 29, 2023 at 8:18 PM Andreas Rheinhardt <
> > andreas.rheinhardt@outlook.com> wrote:
> >
> >> The discrepancy between the definition and the declaration
> >> in allfilters.c is actually UB.
> >>
> >
> > I get no such message with ubsan.
> >
>
> UBSan is a runtime UB-detector, not a compile-time UB detector.
> The earlier code is UB because of 6.2.7 (2) of C11: "All declarations
> that refer to the same object or function shall have compatible type;
> otherwise, the behavior is undefined." A type and its const-qualified
> type are not compatible.
>
This is so minor, that it is fully irrelevant.
>
> - 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] 14+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/4] avfilter/vf_ccrepack: Constify filter
2023-06-29 19:42 ` Paul B Mahol
@ 2023-06-29 19:51 ` James Almer
2023-06-29 19:57 ` Andreas Rheinhardt
2023-07-01 12:01 ` Rémi Denis-Courmont
2 siblings, 0 replies; 14+ messages in thread
From: James Almer @ 2023-06-29 19:51 UTC (permalink / raw)
To: ffmpeg-devel
On 6/29/2023 4:42 PM, Paul B Mahol wrote:
> On Thu, Jun 29, 2023 at 9:35 PM Andreas Rheinhardt <
> andreas.rheinhardt@outlook.com> wrote:
>
>> Paul B Mahol:
>>> On Thu, Jun 29, 2023 at 8:18 PM Andreas Rheinhardt <
>>> andreas.rheinhardt@outlook.com> wrote:
>>>
>>>> The discrepancy between the definition and the declaration
>>>> in allfilters.c is actually UB.
>>>>
>>>
>>> I get no such message with ubsan.
>>>
>>
>> UBSan is a runtime UB-detector, not a compile-time UB detector.
>> The earlier code is UB because of 6.2.7 (2) of C11: "All declarations
>> that refer to the same object or function shall have compatible type;
>> otherwise, the behavior is undefined." A type and its const-qualified
>> type are not compatible.
>>
>
> This is so minor, that it is fully irrelevant.
Msvc was pedantic enough to complain about a double colon, so who knows
if some compiler would do the same for this.
If the spec states both must match, then adding a "const" is hardly a
problem.
_______________________________________________
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] 14+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/4] avfilter/vf_ccrepack: Constify filter
2023-06-29 19:42 ` Paul B Mahol
2023-06-29 19:51 ` James Almer
@ 2023-06-29 19:57 ` Andreas Rheinhardt
2023-07-01 12:01 ` Rémi Denis-Courmont
2 siblings, 0 replies; 14+ messages in thread
From: Andreas Rheinhardt @ 2023-06-29 19:57 UTC (permalink / raw)
To: Paul B Mahol; +Cc: FFmpeg development discussions and patches
Paul B Mahol:
> On Thu, Jun 29, 2023 at 9:35 PM Andreas Rheinhardt <
> andreas.rheinhardt@outlook.com> wrote:
>
>> Paul B Mahol:
>>> On Thu, Jun 29, 2023 at 8:18 PM Andreas Rheinhardt <
>>> andreas.rheinhardt@outlook.com> wrote:
>>>
>>>> The discrepancy between the definition and the declaration
>>>> in allfilters.c is actually UB.
>>>>
>>>
>>> I get no such message with ubsan.
>>>
>>
>> UBSan is a runtime UB-detector, not a compile-time UB detector.
>> The earlier code is UB because of 6.2.7 (2) of C11: "All declarations
>> that refer to the same object or function shall have compatible type;
>> otherwise, the behavior is undefined." A type and its const-qualified
>> type are not compatible.
>>
>
> This is so minor, that it is fully irrelevant.
>
The actual advantage of these patches is that the objects can be put
into read-only memory (.data.rel.ro in elf).
- 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] 14+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/4] avfilter/vf_ccrepack: Constify filter
2023-06-29 19:42 ` Paul B Mahol
2023-06-29 19:51 ` James Almer
2023-06-29 19:57 ` Andreas Rheinhardt
@ 2023-07-01 12:01 ` Rémi Denis-Courmont
2 siblings, 0 replies; 14+ messages in thread
From: Rémi Denis-Courmont @ 2023-07-01 12:01 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Le 29 juin 2023 22:42:17 GMT+03:00, Paul B Mahol <onemda@gmail.com> a écrit :
>On Thu, Jun 29, 2023 at 9:35 PM Andreas Rheinhardt <
>andreas.rheinhardt@outlook.com> wrote:
>
>> Paul B Mahol:
>> > On Thu, Jun 29, 2023 at 8:18 PM Andreas Rheinhardt <
>> > andreas.rheinhardt@outlook.com> wrote:
>> >
>> >> The discrepancy between the definition and the declaration
>> >> in allfilters.c is actually UB.
>> >>
>> >
>> > I get no such message with ubsan.
>> >
>>
>> UBSan is a runtime UB-detector, not a compile-time UB detector.
>> The earlier code is UB because of 6.2.7 (2) of C11: "All declarations
>> that refer to the same object or function shall have compatible type;
>> otherwise, the behavior is undefined." A type and its const-qualified
>> type are not compatible.
>>
>
>This is so minor, that it is fully irrelevant.
UB is one of the most severe type of bug that can happen in C. How exactly is that "fully irrelevant"?
Nobody is ordering you to fix this bug if you don't want to. That's not a reason to block an objective simple well-understood and well-informed bug fix that somebody else made.
>
>
>>
>> - 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".
_______________________________________________
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] 14+ messages in thread
end of thread, other threads:[~2023-07-01 12:01 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-29 18:17 [FFmpeg-devel] [PATCH 1/4] avcodec/cbs_h266: Remove double ; Andreas Rheinhardt
2023-06-29 18:18 ` James Almer
2023-06-29 18:20 ` Andreas Rheinhardt
2023-06-29 18:19 ` [FFmpeg-devel] [PATCH 2/4] avcodec/vvc_parser: Constify parser Andreas Rheinhardt
2023-06-29 18:19 ` James Almer
2023-06-29 18:19 ` [FFmpeg-devel] [PATCH 3/4] avfilter/vf_ccrepack: Constify filter Andreas Rheinhardt
2023-06-29 18:19 ` James Almer
2023-06-29 19:18 ` Paul B Mahol
2023-06-29 19:36 ` Andreas Rheinhardt
2023-06-29 19:42 ` Paul B Mahol
2023-06-29 19:51 ` James Almer
2023-06-29 19:57 ` Andreas Rheinhardt
2023-07-01 12:01 ` Rémi Denis-Courmont
2023-06-29 18:19 ` [FFmpeg-devel] [PATCH 4/4] avformat/ac4dec: Constify demuxer Andreas Rheinhardt
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