cppcheck: fix some reports
Julien Nabet
serval2412 at yahoo.fr
Thu Jan 18 19:28:43 CET 2018
Hello,
Here is a patch attached for vlc.
I used cppcheck, a C/C++ static analyzer.
There was also this last similar report:
[modules/demux/mpeg/mpeg4_iod.c:691] ->
[modules/demux/mpeg/mpeg4_iod.c:691]: (style) Same expression on both
sides of '-='
672 while( i_data )
673 {
674 const uint8_t i_tag = ODGetBytes( &i_data, &p_data, 1 );
675 const unsigned i_length = ODDescriptorLength( &i_data,
&p_data );
676 if( !i_length || i_length > i_data )
677 break;
678 od_debug( p_object, "Decode tag 0x%x length %d", i_tag,
i_length );
679 switch( i_tag )
680 {
681 case ODTag_ObjectDescrUpdate:
682 ObjectDescrUpdateCommandRead( p_object, p_ods,
i_data, p_data );
683 break;
684 case ODTag_ObjectDescrRemove:
685 ObjectDescrRemoveCommandRead( p_object, p_ods,
i_data, p_data );
686 break;
687 default:
688 break;
689 }
690 p_data += i_length;
691 i_data -= i_data;
692 }
but not sure what to do here. (i_data -= i_length; ?)
Regards,
Julien Nabet
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-cppcheck-fix-some-reports.patch
Type: text/x-patch
Size: 2622 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20180118/a25e44b8/attachment.bin>
More information about the vlc-devel
mailing list