mirror of https://git.ffmpeg.org/ffmpeg.git
877b6a9e82
Silences the following warning with gcc 10: src/libavdevice/v4l2.c: In function ‘v4l2_get_device_list’: src/libavdevice/v4l2.c:1042:64: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 251 [-Wformat-truncation=] 1042 | ret = snprintf(device_name, sizeof(device_name), "/dev/%s", entry->d_name); | ^~ src/libavdevice/v4l2.c:1042:15: note: ‘snprintf’ output between 6 and 261 bytes into a destination of size 256 1042 | ret = snprintf(device_name, sizeof(device_name), "/dev/%s", entry->d_name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Previous patches intending to silence it have proposed increasing the buffer size, but doing that correctly seems to be tricky. Failing on truncation is simpler and just as effective (as excessively long device names are unlikely). |
||
---|---|---|
.. | ||
tests | ||
.gitignore | ||
Makefile | ||
alldevices.c | ||
alsa.c | ||
alsa.h | ||
alsa_dec.c | ||
alsa_enc.c | ||
android_camera.c | ||
audiotoolbox.m | ||
avdevice.c | ||
avdevice.h | ||
avdeviceres.rc | ||
avfoundation.m | ||
bktr.c | ||
caca.c | ||
decklink_common.cpp | ||
decklink_common.h | ||
decklink_common_c.h | ||
decklink_dec.cpp | ||
decklink_dec.h | ||
decklink_dec_c.c | ||
decklink_enc.cpp | ||
decklink_enc.h | ||
decklink_enc_c.c | ||
dshow.c | ||
dshow_capture.h | ||
dshow_common.c | ||
dshow_crossbar.c | ||
dshow_enummediatypes.c | ||
dshow_enumpins.c | ||
dshow_filter.c | ||
dshow_pin.c | ||
fbdev_common.c | ||
fbdev_common.h | ||
fbdev_dec.c | ||
fbdev_enc.c | ||
file_open.c | ||
gdigrab.c | ||
iec61883.c | ||
internal.h | ||
jack.c | ||
kmsgrab.c | ||
lavfi.c | ||
libavdevice.v | ||
libcdio.c | ||
libdc1394.c | ||
openal-dec.c | ||
opengl_enc.c | ||
opengl_enc_shaders.h | ||
oss.c | ||
oss.h | ||
oss_dec.c | ||
oss_enc.c | ||
pulse_audio_common.c | ||
pulse_audio_common.h | ||
pulse_audio_dec.c | ||
pulse_audio_enc.c | ||
reverse.c | ||
sdl2.c | ||
sndio.c | ||
sndio.h | ||
sndio_dec.c | ||
sndio_enc.c | ||
timefilter.c | ||
timefilter.h | ||
utils.c | ||
v4l2-common.c | ||
v4l2-common.h | ||
v4l2.c | ||
v4l2enc.c | ||
version.h | ||
vfwcap.c | ||
xcbgrab.c | ||
xv.c |