Issue 10 in webp2: Multiple compilation errors when using GCC 11.2.1 20211203 (Red Hat 11.2.1-7)

20 views
Skip to first unread message

anest… via monorail

unread,
Jan 16, 2022, 9:31:59 PM1/16/22
to webp-d...@webmproject.org
Status: Accepted
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 10 by anest...@gmail.com: Multiple compilation errors when using GCC 11.2.1 20211203 (Red Hat 11.2.1-7)
https://bugs.chromium.org/p/webp2/issues/detail?id=10

GCC 11.2.1 20211203 (Red Hat 11.2.1-7) from Fedora 35 shows quite a number of compilation errors (shown as warnings below because I removed -Werror):

In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’ at /tmp/libwebp2/src/dec/anim_dec.cc:88:18,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’ at /tmp/libwebp2/src/dec/anim_dec.cc:140:21:
/tmp/libwebp2/src/dec/anim_dec.cc:102:33: warning: ‘this’ pointer is null [-Wnonnull]
102 | width = yuv_output->GetWidth();
| ~~~~~~~~~~~~~~~~~~~~^~
In file included from /tmp/libwebp2/src/common/lossy/predictor.h:31,
from /tmp/libwebp2/src/common/global_params.h:25,
from /tmp/libwebp2/src/dec/wp2_dec_i.h:23,
from /tmp/libwebp2/src/dec/anim_dec.cc:24:
/tmp/libwebp2/src/utils/plane.h: In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’:
/tmp/libwebp2/src/utils/plane.h:470:12: note: in a call to non-static member function ‘uint32_t WP2::YUVPlane::GetWidth() const’
470 | uint32_t GetWidth() const;
| ^~~~~~~~
In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’ at /tmp/libwebp2/src/dec/anim_dec.cc:88:18,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’ at /tmp/libwebp2/src/dec/anim_dec.cc:140:21:
/tmp/libwebp2/src/dec/anim_dec.cc:103:35: warning: ‘this’ pointer is null [-Wnonnull]
103 | height = yuv_output->GetHeight();
| ~~~~~~~~~~~~~~~~~~~~~^~
In file included from /tmp/libwebp2/src/common/lossy/predictor.h:31,
from /tmp/libwebp2/src/common/global_params.h:25,
from /tmp/libwebp2/src/dec/wp2_dec_i.h:23,
from /tmp/libwebp2/src/dec/anim_dec.cc:24:
/tmp/libwebp2/src/utils/plane.h: In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’:
/tmp/libwebp2/src/utils/plane.h:471:12: note: in a call to non-static member function ‘uint32_t WP2::YUVPlane::GetHeight() const’
471 | uint32_t GetHeight() const;
| ^~~~~~~~~
In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’ at /tmp/libwebp2/src/dec/anim_dec.cc:88:18,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’ at /tmp/libwebp2/src/dec/anim_dec.cc:140:21:
/tmp/libwebp2/src/dec/anim_dec.cc:128:29: warning: ‘this’ pointer is null [-Wnonnull]
128 | csp_transform->ToYuv(ToArgb32b(features.background_color));
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/libwebp2/src/utils/plane.h:29,
from /tmp/libwebp2/src/common/lossy/predictor.h:31,
from /tmp/libwebp2/src/common/global_params.h:25,
from /tmp/libwebp2/src/dec/wp2_dec_i.h:23,
from /tmp/libwebp2/src/dec/anim_dec.cc:24:
/tmp/libwebp2/src/utils/csp.h: In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’:
/tmp/libwebp2/src/utils/csp.h:116:11: note: in a call to non-static member function ‘WP2::Ayuv38b WP2::CSPTransform::ToYuv(const WP2::Argb32b&) const’
116 | Ayuv38b ToYuv(const Argb32b& color) const;
| ^~~~~
In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’ at /tmp/libwebp2/src/dec/anim_dec.cc:88:18,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’ at /tmp/libwebp2/src/dec/anim_dec.cc:140:21:
/tmp/libwebp2/src/dec/anim_dec.cc:130:21: warning: ‘this’ pointer is null [-Wnonnull]
130 | yuv_output->Fill(top, color);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /tmp/libwebp2/src/common/lossy/predictor.h:31,
from /tmp/libwebp2/src/common/global_params.h:25,
from /tmp/libwebp2/src/dec/wp2_dec_i.h:23,
from /tmp/libwebp2/src/dec/anim_dec.cc:24:
/tmp/libwebp2/src/utils/plane.h: In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’:
/tmp/libwebp2/src/utils/plane.h:493:8: note: in a call to non-static member function ‘void WP2::YUVPlane::Fill(const WP2::Rectangle&, const WP2::Ayuv38b&)’
493 | void Fill(const Rectangle& rect, const Ayuv38b& color);
| ^~~~
In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’ at /tmp/libwebp2/src/dec/anim_dec.cc:88:18,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’ at /tmp/libwebp2/src/dec/anim_dec.cc:140:21:
/tmp/libwebp2/src/dec/anim_dec.cc:131:21: warning: ‘this’ pointer is null [-Wnonnull]
131 | yuv_output->Fill(bot, color);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /tmp/libwebp2/src/common/lossy/predictor.h:31,
from /tmp/libwebp2/src/common/global_params.h:25,
from /tmp/libwebp2/src/dec/wp2_dec_i.h:23,
from /tmp/libwebp2/src/dec/anim_dec.cc:24:
/tmp/libwebp2/src/utils/plane.h: In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’:
/tmp/libwebp2/src/utils/plane.h:493:8: note: in a call to non-static member function ‘void WP2::YUVPlane::Fill(const WP2::Rectangle&, const WP2::Ayuv38b&)’
493 | void Fill(const Rectangle& rect, const Ayuv38b& color);
| ^~~~
In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’ at /tmp/libwebp2/src/dec/anim_dec.cc:88:18,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’ at /tmp/libwebp2/src/dec/anim_dec.cc:140:21:
/tmp/libwebp2/src/dec/anim_dec.cc:132:21: warning: ‘this’ pointer is null [-Wnonnull]
132 | yuv_output->Fill(lft, color);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /tmp/libwebp2/src/common/lossy/predictor.h:31,
from /tmp/libwebp2/src/common/global_params.h:25,
from /tmp/libwebp2/src/dec/wp2_dec_i.h:23,
from /tmp/libwebp2/src/dec/anim_dec.cc:24:
/tmp/libwebp2/src/utils/plane.h: In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’:
/tmp/libwebp2/src/utils/plane.h:493:8: note: in a call to non-static member function ‘void WP2::YUVPlane::Fill(const WP2::Rectangle&, const WP2::Ayuv38b&)’
493 | void Fill(const Rectangle& rect, const Ayuv38b& color);
| ^~~~
In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’ at /tmp/libwebp2/src/dec/anim_dec.cc:88:18,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’ at /tmp/libwebp2/src/dec/anim_dec.cc:140:21:
/tmp/libwebp2/src/dec/anim_dec.cc:133:21: warning: ‘this’ pointer is null [-Wnonnull]
133 | yuv_output->Fill(rgt, color);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /tmp/libwebp2/src/common/lossy/predictor.h:31,
from /tmp/libwebp2/src/common/global_params.h:25,
from /tmp/libwebp2/src/dec/wp2_dec_i.h:23,
from /tmp/libwebp2/src/dec/anim_dec.cc:24:
/tmp/libwebp2/src/utils/plane.h: In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’:
/tmp/libwebp2/src/utils/plane.h:493:8: note: in a call to non-static member function ‘void WP2::YUVPlane::Fill(const WP2::Rectangle&, const WP2::Ayuv38b&)’
493 | void Fill(const Rectangle& rect, const Ayuv38b& color);
|









In file included from /tmp/libwebp2/src/utils/ans_utils.h:30,
from /tmp/libwebp2/tests/test_assert.cc:22:
In member function ‘uint32_t WP2::ANSEncBase::PutASymbol(uint32_t, WP2::ANSAdaptiveSymbol*, const char*)’,
inlined from ‘int main(int, const char**)’ at /tmp/libwebp2/tests/test_assert.cc:79:21:
/tmp/libwebp2/src/utils/ans_enc.h:201:17: warning: ‘this’ pointer is null [-Wnonnull]
201 | asym->Update(symbol);
| ~~~~~~~~~~~~^~~~~~~~
In file included from /tmp/libwebp2/tests/test_assert.cc:21:
/tmp/libwebp2/src/utils/ans.h: In function ‘int main(int, const char**)’:
/tmp/libwebp2/src/utils/ans.h:208:8: note: in a call to non-static member function ‘void WP2::ANSAdaptiveSymbol::Update(uint32_t)’
208 | void Update(uint32_t sym);

--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

pasca… via monorail

unread,
Jan 17, 2022, 1:34:39 AM1/17/22
to webp-d...@webmproject.org
Updates:
Owner: pasca...@gmail.com

Comment #1 on issue 10 by pasca...@gmail.com: Multiple compilation errors when using GCC 11.2.1 20211203 (Red Hat 11.2.1-7)
https://bugs.chromium.org/p/webp2/issues/detail?id=10#c1

Hi,

normally, this patch should have taken care of these warnings:

https://chromium.googlesource.com/codecs/libwebp2/+/75e732c83672aca8268b851b369e2d1b2991975b

anest… via monorail

unread,
Jan 17, 2022, 4:47:41 AM1/17/22
to webp-d...@webmproject.org

Comment #2 on issue 10 by anest...@gmail.com: Multiple compilation errors when using GCC 11.2.1 20211203 (Red Hat 11.2.1-7)
https://bugs.chromium.org/p/webp2/issues/detail?id=10#c2

There are lots more errors still, this patch addresses just one of them:


In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’ at /tmp/1/libwebp2/src/dec/anim_dec.cc:88:18,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’ at /tmp/1/libwebp2/src/dec/anim_dec.cc:140:21:
/tmp/1/libwebp2/src/dec/anim_dec.cc:102:33: error: ‘this’ pointer is null [-Werror=nonnull]

102 | width = yuv_output->GetWidth();
| ~~~~~~~~~~~~~~~~~~~~^~
In file included from /tmp/1/libwebp2/src/common/lossy/predictor.h:31,
from /tmp/1/libwebp2/src/common/global_params.h:25,
from /tmp/1/libwebp2/src/dec/wp2_dec_i.h:23,
from /tmp/1/libwebp2/src/dec/anim_dec.cc:24:
/tmp/1/libwebp2/src/utils/plane.h: In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’:
/tmp/1/libwebp2/src/utils/plane.h:470:12: note: in a call to non-static member function ‘uint32_t WP2::YUVPlane::GetWidth() const’

470 | uint32_t GetWidth() const;
| ^~~~~~~~
In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’ at /tmp/1/libwebp2/src/dec/anim_dec.cc:88:18,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’ at /tmp/1/libwebp2/src/dec/anim_dec.cc:140:21:
/tmp/1/libwebp2/src/dec/anim_dec.cc:103:35: error: ‘this’ pointer is null [-Werror=nonnull]

103 | height = yuv_output->GetHeight();
| ~~~~~~~~~~~~~~~~~~~~~^~
In file included from /tmp/1/libwebp2/src/common/lossy/predictor.h:31,
from /tmp/1/libwebp2/src/common/global_params.h:25,
from /tmp/1/libwebp2/src/dec/wp2_dec_i.h:23,
from /tmp/1/libwebp2/src/dec/anim_dec.cc:24:
/tmp/1/libwebp2/src/utils/plane.h: In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’:
/tmp/1/libwebp2/src/utils/plane.h:471:12: note: in a call to non-static member function ‘uint32_t WP2::YUVPlane::GetHeight() const’

471 | uint32_t GetHeight() const;
| ^~~~~~~~~
In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’ at /tmp/1/libwebp2/src/dec/anim_dec.cc:88:18,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’ at /tmp/1/libwebp2/src/dec/anim_dec.cc:140:21:
/tmp/1/libwebp2/src/dec/anim_dec.cc:128:29: error: ‘this’ pointer is null [-Werror=nonnull]
128 | csp_transform->ToYuv(ToArgb32b(features.background_color));
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/1/libwebp2/src/utils/plane.h:29,
from /tmp/1/libwebp2/src/common/lossy/predictor.h:31,
from /tmp/1/libwebp2/src/common/global_params.h:25,
from /tmp/1/libwebp2/src/dec/wp2_dec_i.h:23,
from /tmp/1/libwebp2/src/dec/anim_dec.cc:24:
/tmp/1/libwebp2/src/utils/csp.h: In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’:
/tmp/1/libwebp2/src/utils/csp.h:116:11: note: in a call to non-static member function ‘WP2::Ayuv38b WP2::CSPTransform::ToYuv(const WP2::Argb32b&) const’

116 | Ayuv38b ToYuv(const Argb32b& color) const;
| ^~~~~
In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’ at /tmp/1/libwebp2/src/dec/anim_dec.cc:88:18,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’ at /tmp/1/libwebp2/src/dec/anim_dec.cc:140:21:
/tmp/1/libwebp2/src/dec/anim_dec.cc:130:21: error: ‘this’ pointer is null [-Werror=nonnull]

130 | yuv_output->Fill(top, color);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /tmp/1/libwebp2/src/common/lossy/predictor.h:31,
from /tmp/1/libwebp2/src/common/global_params.h:25,
from /tmp/1/libwebp2/src/dec/wp2_dec_i.h:23,
from /tmp/1/libwebp2/src/dec/anim_dec.cc:24:
/tmp/1/libwebp2/src/utils/plane.h: In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’:
/tmp/1/libwebp2/src/utils/plane.h:493:8: note: in a call to non-static member function ‘void WP2::YUVPlane::Fill(const WP2::Rectangle&, const WP2::Ayuv38b&)’

493 | void Fill(const Rectangle& rect, const Ayuv38b& color);
| ^~~~
In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’ at /tmp/1/libwebp2/src/dec/anim_dec.cc:88:18,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’ at /tmp/1/libwebp2/src/dec/anim_dec.cc:140:21:
/tmp/1/libwebp2/src/dec/anim_dec.cc:131:21: error: ‘this’ pointer is null [-Werror=nonnull]

131 | yuv_output->Fill(bot, color);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /tmp/1/libwebp2/src/common/lossy/predictor.h:31,
from /tmp/1/libwebp2/src/common/global_params.h:25,
from /tmp/1/libwebp2/src/dec/wp2_dec_i.h:23,
from /tmp/1/libwebp2/src/dec/anim_dec.cc:24:
/tmp/1/libwebp2/src/utils/plane.h: In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’:
/tmp/1/libwebp2/src/utils/plane.h:493:8: note: in a call to non-static member function ‘void WP2::YUVPlane::Fill(const WP2::Rectangle&, const WP2::Ayuv38b&)’

493 | void Fill(const Rectangle& rect, const Ayuv38b& color);
| ^~~~
In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’ at /tmp/1/libwebp2/src/dec/anim_dec.cc:88:18,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’ at /tmp/1/libwebp2/src/dec/anim_dec.cc:140:21:
/tmp/1/libwebp2/src/dec/anim_dec.cc:132:21: error: ‘this’ pointer is null [-Werror=nonnull]

132 | yuv_output->Fill(lft, color);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /tmp/1/libwebp2/src/common/lossy/predictor.h:31,
from /tmp/1/libwebp2/src/common/global_params.h:25,
from /tmp/1/libwebp2/src/dec/wp2_dec_i.h:23,
from /tmp/1/libwebp2/src/dec/anim_dec.cc:24:
/tmp/1/libwebp2/src/utils/plane.h: In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’:
/tmp/1/libwebp2/src/utils/plane.h:493:8: note: in a call to non-static member function ‘void WP2::YUVPlane::Fill(const WP2::Rectangle&, const WP2::Ayuv38b&)’

493 | void Fill(const Rectangle& rect, const Ayuv38b& color);
| ^~~~
In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*, const WP2::CSPTransform*, WP2::YUVPlane*)’ at /tmp/1/libwebp2/src/dec/anim_dec.cc:88:18,
inlined from ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’ at /tmp/1/libwebp2/src/dec/anim_dec.cc:140:21:
/tmp/1/libwebp2/src/dec/anim_dec.cc:133:21: error: ‘this’ pointer is null [-Werror=nonnull]

133 | yuv_output->Fill(rgt, color);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /tmp/1/libwebp2/src/common/lossy/predictor.h:31,
from /tmp/1/libwebp2/src/common/global_params.h:25,
from /tmp/1/libwebp2/src/dec/wp2_dec_i.h:23,
from /tmp/1/libwebp2/src/dec/anim_dec.cc:24:
/tmp/1/libwebp2/src/utils/plane.h: In function ‘WP2Status WP2::FillBorders(const WP2::BitstreamFeatures&, const WP2::AnimationFrame&, WP2::ArgbBuffer*)’:
/tmp/1/libwebp2/src/utils/plane.h:493:8: note: in a call to non-static member function ‘void WP2::YUVPlane::Fill(const WP2::Rectangle&, const WP2::Ayuv38b&)’

493 | void Fill(const Rectangle& rect, const Ayuv38b& color);
| ^~~~
[ 47%] Building CXX object CMakeFiles/wp2_enc_dec.dir/src/dec/lossless_dec.cc.o

pasca… via monorail

unread,
Jan 17, 2022, 7:30:10 AM1/17/22
to webp-d...@webmproject.org

Comment #3 on issue 10 by pasca...@gmail.com: Multiple compilation errors when using GCC 11.2.1 20211203 (Red Hat 11.2.1-7)
https://bugs.chromium.org/p/webp2/issues/detail?id=10#c3

Hi,

thanks for the report. Could you try https://chromium-review.googlesource.com/c/codecs/libwebp2/+/3395132 ?
If there's still some warnings reported, could you attach the full log please?

Thanks

anest… via monorail

unread,
Jan 17, 2022, 8:30:41 AM1/17/22
to webp-d...@webmproject.org

Comment #4 on issue 10 by anest...@gmail.com: Multiple compilation errors when using GCC 11.2.1 20211203 (Red Hat 11.2.1-7)
https://bugs.chromium.org/p/webp2/issues/detail?id=10#c4

With this commit we are down to a single error:

In file included from /tmp/1/libwebp2/src/utils/ans_utils.h:30,
from /tmp/1/libwebp2/tests/test_assert.cc:22:

In member function ‘uint32_t WP2::ANSEncBase::PutASymbol(uint32_t, WP2::ANSAdaptiveSymbol*, const char*)’,
inlined from ‘int main(int, const char**)’ at /tmp/1/libwebp2/tests/test_assert.cc:79:21:
/tmp/1/libwebp2/src/utils/ans_enc.h:202:17: warning: ‘this’ pointer is null [-Wnonnull]
202 | asym->Update(symbol);
| ~~~~~~~~~~~~^~~~~~~~
In file included from /tmp/1/libwebp2/tests/test_assert.cc:21:
/tmp/1/libwebp2/src/utils/ans.h: In function ‘int main(int, const char**)’:
/tmp/1/libwebp2/src/utils/ans.h:208:8: note: in a call to non-static member function ‘void WP2::ANSAdaptiveSymbol::Update(uint32_t)’
208 | void Update(uint32_t sym);
| ^~~~~~

Nothing else is reported after removing -Werror.

anest… via monorail

unread,
Jan 17, 2022, 8:38:39 AM1/17/22
to webp-d...@webmproject.org

Comment #5 on issue 10 by anest...@gmail.com: Multiple compilation errors when using GCC 11.2.1 20211203 (Red Hat 11.2.1-7)
https://bugs.chromium.org/p/webp2/issues/detail?id=10#c5

After enabling -Wformat -Wextra there's a million more warnings but it's really up to you whether to fix them:

Attachments:
build.log.xz 1.8 KB
build-warning.log.xz 21.9 KB

pasca… via monorail

unread,
Jan 17, 2022, 9:46:38 AM1/17/22
to webp-d...@webmproject.org

Comment #6 on issue 10 by pasca...@gmail.com: Multiple compilation errors when using GCC 11.2.1 20211203 (Red Hat 11.2.1-7)
https://bugs.chromium.org/p/webp2/issues/detail?id=10#c6

the error in 'test_assert' is expected, since the test is actually testing that calling the function with a nullptr argument is going to crash.
Not sure it should be 'fixed'.

For the -Wformat, these warnings are somehow known and not really harmful.
For -Wextra, it might be preferable to not fixed them, since keeping the name of the variables in the signatures, even if they are unused, is somewhat useful.

Thanks for the logs!

anest… via monorail

unread,
Jan 17, 2022, 9:48:10 AM1/17/22
to webp-d...@webmproject.org

Comment #7 on issue 10 by anest...@gmail.com: Multiple compilation errors when using GCC 11.2.1 20211203 (Red Hat 11.2.1-7)
https://bugs.chromium.org/p/webp2/issues/detail?id=10#c7


> the error in 'test_assert' is expected, since the test is actually testing that calling the function with a nullptr argument is going to crash.

It prevents it from building/compiling properly, not sure whether it's really OK.

> Thanks for the logs!

You're very welcome.

pasca… via monorail

unread,
Jan 17, 2022, 9:59:16 AM1/17/22
to webp-d...@webmproject.org

Comment #8 on issue 10 by pasca...@gmail.com: Multiple compilation errors when using GCC 11.2.1 20211203 (Red Hat 11.2.1-7)
https://bugs.chromium.org/p/webp2/issues/detail?id=10#c8

well, i wonder whether this new warnings from gcc are really useful because:
* they don't see the assert() preventing some API errors from callers (that our test was checking, but only in DEBUG compile mode)
* they were a bit short-sighted in their static analysis in the first case (not seeing that either one or the other of the two pointers could be nullptr, not both)

Let's submit this first patch of fixes and then work on test_assert

Git Watcher via monorail

unread,
Jan 17, 2022, 10:26:07 AM1/17/22
to webp-d...@webmproject.org

Comment #9 on issue 10 by Git Watcher: Multiple compilation errors when using GCC 11.2.1 20211203 (Red Hat 11.2.1-7)
https://bugs.chromium.org/p/webp2/issues/detail?id=10#c9

The following revision refers to this bug:
https://chromium.googlesource.com/codecs/libwebp2/+/491a74a3787a102af5ca1ed32bcb41ca3d907ef5

commit 491a74a3787a102af5ca1ed32bcb41ca3d907ef5
Author: Pascal Massimino <sk...@google.com>
Date: Mon Jan 17 12:28:19 2022

Fix more g++ 11.2 static analyzer warnings

BUG=webp2:10

Change-Id: I2403e3afffbc8949d73590bf8aef8343fb2e1730
Reviewed-on: https://chromium-review.googlesource.com/c/codecs/libwebp2/+/3395132
Tested-by: WebM Builds <bui...@webmproject.org>
Reviewed-by: Yannis Guyon <ygu...@google.com>

[modify] https://crrev.com/491a74a3787a102af5ca1ed32bcb41ca3d907ef5/src/utils/ans_enc.h
[modify] https://crrev.com/491a74a3787a102af5ca1ed32bcb41ca3d907ef5/src/dec/anim_dec.cc
Reply all
Reply to author
Forward
0 new messages