Fix 'xyz may be used uninitialized' compiler warnings caused by broken g_assert_not_reached() macro in GLib-2.15.x (i...

Original commit message from CVS:
* gst/avi/gstavidemux.c: (gst_avi_demux_loop):
* gst/wavparse/gstwavparse.c: (gst_wavparse_chain):
* sys/ximage/gstximagesrc.c: (composite_pixel):
Fix 'xyz may be used uninitialized' compiler warnings caused
by broken g_assert_not_reached() macro in GLib-2.15.x (it's
not really nice to abort in any case). Fixes #505745.
This commit is contained in:
Tim-Philipp Müller 2007-12-26 16:03:57 +00:00
parent 427ab08ae2
commit bcdeaa639b
4 changed files with 14 additions and 3 deletions

View File

@ -1,3 +1,12 @@
2007-12-26 Tim-Philipp Müller <tim at centricular dot net>
* gst/avi/gstavidemux.c: (gst_avi_demux_loop):
* gst/wavparse/gstwavparse.c: (gst_wavparse_chain):
* sys/ximage/gstximagesrc.c: (composite_pixel):
Fix 'xyz may be used uninitialized' compiler warnings caused
by broken g_assert_not_reached() macro in GLib-2.15.x (it's
not really nice to abort in any case). Fixes #505745.
2007-12-18 Tim-Philipp Müller <tim at centricular dot net> 2007-12-18 Tim-Philipp Müller <tim at centricular dot net>
* tests/check/elements/avisubtitle.c: (check_correct_buffer): * tests/check/elements/avisubtitle.c: (check_correct_buffer):

View File

@ -3734,7 +3734,9 @@ gst_avi_demux_loop (GstPad * pad)
} }
break; break;
default: default:
g_assert_not_reached (); GST_ERROR_OBJECT (avi, "unknown state %d", avi->state);
res = GST_FLOW_ERROR;
goto pause;
} }
GST_LOG_OBJECT (avi, "state: %d res:%s", avi->state, gst_flow_get_name (res)); GST_LOG_OBJECT (avi, "state: %d res:%s", avi->state, gst_flow_get_name (res));

View File

@ -1821,7 +1821,7 @@ gst_wavparse_chain (GstPad * pad, GstBuffer * buf)
goto done; goto done;
break; break;
default: default:
g_assert_not_reached (); g_return_val_if_reached (GST_FLOW_ERROR);
} }
done: done:
return ret; return ret;

View File

@ -280,7 +280,7 @@ composite_pixel (GstXContext * xcontext, guchar * dest, guchar * src)
break; break;
default: default:
/* Should not reach here */ /* Should not reach here */
g_assert_not_reached (); g_return_if_reached ();
} }
/* possible optimisation: /* possible optimisation: