Skip to content

mjpeg_encoder_reset_quality: do not hint inline

Let the compiler decide.

Apparently it causes CI makecheck to fail (see below). Seems to me it's a gcc problem -- was working with version 9, fails with version 10. Making the function a non-inline one "fixes" this issue. Alternatively adding to the structure "int dummy" above the "int type" "fixes" the build too (but I went with the non-inline solution).

==== error ==== CC mjpeg-encoder.lo In file included from /usr/include/string.h:495, from ../../server/red-common.h:24, from ../../server/mjpeg-encoder.c:25: In function ‘memset’, inlined from ‘mjpeg_encoder_reset_quality’ at ../../server/mjpeg-encoder.c:385:5, inlined from ‘mjpeg_encoder_quality_eval_stop.part.0’ at ../../server/mjpeg-encoder.c:999:5: /usr/include/bits/string_fortified.h:71:10: error: ‘__builtin_memset’ offset [788, 871] from the object at ‘encoder’ is out of the bounds of referenced subobject ‘type’ with type ‘int’ at offset 784 [-Werror=array-bounds] 71 | return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../server/mjpeg-encoder.c: In function ‘mjpeg_encoder_quality_eval_stop.part.0’: ../../server/mjpeg-encoder.c:96:9: note: subobject ‘type’ declared here 96 | int type; | ^~~~ cc1: all warnings being treated as errors

Merge request reports