GNOME Bugzilla – Bug 736906
wavparse: Initializing variables before using them
Last modified: 2018-01-22 18:31:58 UTC
Created attachment 286498 [details] [review] wavparse: Initializing variables before using them Initializing stop, cur variables before sending them by reference
True. If !event and cur is used uninitialized. Could you fix the commit message format? It needs the bug id link, then I will merge this. Format is as follows or check commits in the git log as reference: area: summary well written description bug id link
Created attachment 287148 [details] [review] wavparse: cur, stop are not initialized before sending them as parameter cur, stop are not initialized in gst_wavparse_perform_seek function before sending them as parameter to gst_event_parse_seek function. Initializing these varibles
Created attachment 295721 [details] [review] wavparse: Initializing uninitialized cur, stop variables cur, stop variable at line 376 are not initialized before sending them by reference to another function. Initializing them to avoid any possible issues due to it.
Comment on attachment 295721 [details] [review] wavparse: Initializing uninitialized cur, stop variables Thanks for the patch. Two more nitpicks (sorry! :)) 1) I think for clarity these two should be set in the else block of if(event){ } else { ... } alongside the other bits that are set there. 2) I think in the else block stop_type should be set to GST_SEEK_TYPE_NONE (this is unrelated to your patch I guess), I'm a bit puzzled why this wasn't a problem so far though. If we do start_type=SET,start=0,stop_type=SET,stop=0 I would expect it to stop immediately. I'm clearly missing something.
Dunno what to do with this. Doesn't hurt to initialise them, but should also not be needed. And if they should probably be initialised to 0/-1 or so. Closing for now to reduce clutter.