GNOME Bugzilla – Bug 788550
test-egl: g_assert_not_reached called incorrectly in function handle_queued_objects
Last modified: 2018-01-19 10:17:38 UTC
In File : testegl.c Function : static gboolean handle_queued_objects (APP_STATE_T * state) Line No. 942 g_assert_not_reached in correctly called in both if and else clauses ---------------------- if (gst_structure_has_name (s, "not-used")) { g_assert_not_reached (); } else { g_assert_not_reached (); } --------------------- as g_assert_not_reached()is a debugging macro to terminate the application if it is ever reached. If it is reached, an error message is logged and the application is terminated. Solution : else clause should be removed - else { - g_assert_not_reached (); - } Please let me know if I can submit a patch
Please don't ask to submit a patch, just make a patch from the start, thanks. This avoids us having to look at something multiple times if the fix is right.
Created attachment 360952 [details] [review] [PATCH][Fix for] g_assert_not_reached called incorrectly in both if and else Please review the patch attached to fix the issue
Julien: could you take a quick look please? I don't understand this code. How do we know the else should be removed and not the if branch?
Review of attachment 360952 [details] [review]: ::: gst-omx-1.12.3_org/examples/egl/testegl.c @@ +941,1 @@ Thx for the patch. Please remove the whole block "else if (GST_IS_QUERY (object)) {". It should have been removed by this commit https://cgit.freedesktop.org/gstreamer/gst-omx/commit/examples/egl/testegl.c?id=f1c76ef92112acc7855d5715ac149a3620559f6a , my mistake. Indeed the function "queue_object" does not queue any query anymore.
Created attachment 367068 [details] [review] [Patch][gst-omx] TestEgl: Removed redundant/unused code Review comment implemented.
Review of attachment 367068 [details] [review]: Thx for the updated patch. Hi Tim, would you mind to push it ? Thx a lot.
Done. Thank you both! commit fdf3b39dd4d634297c9a2effaea00f4dd0e71c52 (HEAD -> master) Author: Ashish Kumar <kr.ashish@samsung.com> Date: Fri Jan 19 15:18:23 2018 +0530 TestEgl: Removed redundant/unused code https://bugzilla.gnome.org/show_bug.cgi?id=788550