gst/mpegstream/gstrfc2250enc.c: Fix code that ignores return value of gst_buffer_merge(). (bug #114560)

Original commit message from CVS:
* gst/mpegstream/gstrfc2250enc.c: (gst_rfc2250_enc_add_slice):
Fix code that ignores return value of gst_buffer_merge().
(bug #114560)
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_descramble_segment):
* gst/mpegstream/gstrfc2250enc.c: (gst_rfc2250_enc_add_slice): same
* testsuite/gst-lint:  Check for above.
This commit is contained in:
David Schleef 2004-03-06 01:25:58 +00:00
parent 84dfbc108d
commit 16860a5c42
3 changed files with 33 additions and 14 deletions

View file

@ -1,3 +1,12 @@
2004-03-05 David Schleef <ds@schleef.org>
* gst/mpegstream/gstrfc2250enc.c: (gst_rfc2250_enc_add_slice):
Fix code that ignores return value of gst_buffer_merge().
(bug #114560)
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_descramble_segment):
* gst/mpegstream/gstrfc2250enc.c: (gst_rfc2250_enc_add_slice): same
* testsuite/gst-lint: Check for above.
2004-03-05 David Schleef <ds@schleef.org> 2004-03-05 David Schleef <ds@schleef.org>
* gst/udp/gstudpsrc.c: (gst_udpsrc_get): Check for unfixed * gst/udp/gstudpsrc.c: (gst_udpsrc_get): Check for unfixed

View file

@ -31,7 +31,7 @@ sub check_carriage_returns();
sub check_printf_lld(); sub check_printf_lld();
sub check_glibisms(); sub check_glibisms();
sub check_indentation(); sub check_indentation();
sub check_gst_props_set(); sub check_no_ignore();
sub check_deprecated(); sub check_deprecated();
sub check_config_h(); sub check_config_h();
sub check_varargs_functions(); sub check_varargs_functions();
@ -63,7 +63,7 @@ foreach $filename (<FIND>) {
# important stuff # important stuff
check_bad_includes(); check_bad_includes();
check_printf_lld(); check_printf_lld();
check_gst_props_set(); check_no_ignore();
check_deprecated(); check_deprecated();
check_config_h(); check_config_h();
check_old_typefind(); check_old_typefind();
@ -263,13 +263,18 @@ sub check_indentation()
# #
# gst_props_set() returns a value that should never be ignored # Check (roughly) for functions whose value should not be ignored
# may have false positives
# #
sub check_gst_props_set() sub check_no_ignore()
{ {
if (grep { /^\s+gst_props_set\s*\(/; } @lines) { if (grep { /^\s+gst_buffer_merge\s*\(/; } @lines) {
print "E: return value of gst_props_set() possibly ignored\n"; print "E: return value of gst_buffer_merge () possibly ignored\n";
}
if (grep { /^\s+malloc\s*\(/; } @lines) {
print "E: return value of malloc() possibly ignored\n";
}
if (grep { /^\s+gst_buffer_new\s*\(/; } @lines) {
print "E: return value of gst_buffer_new() possibly ignored\n";
} }
} }

View file

@ -31,7 +31,7 @@ sub check_carriage_returns();
sub check_printf_lld(); sub check_printf_lld();
sub check_glibisms(); sub check_glibisms();
sub check_indentation(); sub check_indentation();
sub check_gst_props_set(); sub check_no_ignore();
sub check_deprecated(); sub check_deprecated();
sub check_config_h(); sub check_config_h();
sub check_varargs_functions(); sub check_varargs_functions();
@ -63,7 +63,7 @@ foreach $filename (<FIND>) {
# important stuff # important stuff
check_bad_includes(); check_bad_includes();
check_printf_lld(); check_printf_lld();
check_gst_props_set(); check_no_ignore();
check_deprecated(); check_deprecated();
check_config_h(); check_config_h();
check_old_typefind(); check_old_typefind();
@ -263,13 +263,18 @@ sub check_indentation()
# #
# gst_props_set() returns a value that should never be ignored # Check (roughly) for functions whose value should not be ignored
# may have false positives
# #
sub check_gst_props_set() sub check_no_ignore()
{ {
if (grep { /^\s+gst_props_set\s*\(/; } @lines) { if (grep { /^\s+gst_buffer_merge\s*\(/; } @lines) {
print "E: return value of gst_props_set() possibly ignored\n"; print "E: return value of gst_buffer_merge () possibly ignored\n";
}
if (grep { /^\s+malloc\s*\(/; } @lines) {
print "E: return value of malloc() possibly ignored\n";
}
if (grep { /^\s+gst_buffer_new\s*\(/; } @lines) {
print "E: return value of gst_buffer_new() possibly ignored\n";
} }
} }