Skip to content

G-API: replace GAPI_Assert() with 'false' and '0' to GAPI_Error()#22935

Merged
alalek merged 4 commits intoopencv:4.xfrom
alalek:gapi_error
Dec 19, 2022
Merged

G-API: replace GAPI_Assert() with 'false' and '0' to GAPI_Error()#22935
alalek merged 4 commits intoopencv:4.xfrom
alalek:gapi_error

Conversation

@alalek
Copy link
Copy Markdown
Member

@alalek alalek commented Dec 9, 2022

to eliminate build warnings about unreachable control flow (GCC 12)

relates #21496

Update rules:

echo "Patch: $1"
sed -i "s/GAPI_Assert(false)/GAPI_Error(\"InternalError\")/g" $1
sed -i "s/GAPI_Assert(false && \"/GAPI_Error(\"/g" $1
sed -i "s/GAPI_Assert(0 && \"/GAPI_Error(\"/g" $1

TODO:

  • resolve new MSVC build warnings
force_builders=Win64,Win64 OpenCL,Win32,Custom Win
Xtest_modules=none

Xbuild_gapi_standalone:Linux x64=ade-0.1.2a
Xbuild_gapi_standalone:Win64=ade-0.1.2a

build_image:Custom=ubuntu:22.04
buildworker:Custom=linux-4

@alalek
Copy link
Copy Markdown
Member Author

alalek commented Dec 9, 2022

/cc @dmatveev

@alalek
Copy link
Copy Markdown
Member Author

alalek commented Dec 14, 2022

@dmatveev Need someone who can check G-API "standalone" mode.

@asmorkalov
Copy link
Copy Markdown
Contributor

@dmatveev friendly reminder.

@alalek
Copy link
Copy Markdown
Member Author

alalek commented Dec 15, 2022

@dmatveev Standalone G-API build is broken on 4.x branch (without this patch).

Copy link
Copy Markdown
Contributor

@dmatveev dmatveev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am fine with this.. Thank you so much!

@dmatveev
Copy link
Copy Markdown
Contributor

@dmatveev Standalone G-API build is broken on 4.x branch (without this patch).

We'll definitely look into this as there is some work to do for an upcoming OpenVINO release.. BTW standalone isn't tested now on CI, right?

@alalek
Copy link
Copy Markdown
Member Author

alalek commented Dec 16, 2022

@dmatveev G-API standalone mode could be run with PRs on BuildBot CI using the old instructions:

build_gapi_standalone:Linux x64=ade-0.1.2a
build_gapi_standalone:Win64=ade-0.1.2a

(but there is no regular testing for that)

Logs with issues for this PR are here:

@dmatveev
Copy link
Copy Markdown
Contributor

So let's merge it then? because why not?

@alalek alalek merged commit 91998d6 into opencv:4.x Dec 19, 2022
@alalek alalek mentioned this pull request Jan 8, 2023
a-sajjad72 pushed a commit to a-sajjad72/opencv that referenced this pull request Mar 30, 2023
G-API: replace GAPI_Assert() with 'false' and '0' to GAPI_Error()

* gapi: GAPI_Error() macro

* gapi: replace GAPI_Assert() with 'false' and '0' to GAPI_Error()

* build: eliminate 'unreachable code' after CV_Error() (MSVC 2015)

* build: eliminate 'unreachable code' warning for MSVS 2015/2017

- observed in constructors stubs with throwing exception
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants