mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-08 19:19:05 +00:00
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
Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
10749220dd
commit
8d8745211d
@ -363,10 +363,10 @@ static uint32_t get_max_fps(uint64_t frame_size, uint64_t bytes_per_sec)
|
||||
return frame_size ? bytes_per_sec / frame_size : MJPEG_MAX_FPS;
|
||||
}
|
||||
|
||||
static inline void mjpeg_encoder_reset_quality(MJpegEncoder *encoder,
|
||||
int quality_id,
|
||||
uint32_t fps,
|
||||
uint64_t frame_enc_size)
|
||||
static void mjpeg_encoder_reset_quality(MJpegEncoder *encoder,
|
||||
int quality_id,
|
||||
uint32_t fps,
|
||||
uint64_t frame_enc_size)
|
||||
{
|
||||
MJpegEncoderRateControl *rate_control = &encoder->rate_control;
|
||||
double fps_ratio;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user