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>
* tests/check/elements/avisubtitle.c: (check_correct_buffer):

View file

@ -3734,7 +3734,9 @@ gst_avi_demux_loop (GstPad * pad)
}
break;
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));

View file

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

View file

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