pipewire/spa/plugins
Konstantin Kharlamov ed9560fb03 alsa: fix "now.tv_sec maybe used uninitialized" warnings
Fixes a number of warnings that look like this:

    In file included from ../spa/include/spa/utils/result.h:37,
                     from ../spa/plugins/alsa/alsa-seq.c:35:
    In function ‘set_timers’,
        inlined from ‘do_reassign_follower’ at ../spa/plugins/alsa/alsa-seq.c:909:2:
    ../spa/include/spa/utils/defs.h:191:39: warning: ‘now.tv_sec’ may be used uninitialized [-Wmaybe-uninitialized]
      191 | #define SPA_TIMESPEC_TO_NSEC(ts) ((ts)->tv_sec * SPA_NSEC_PER_SEC + (ts)->tv_nsec)
          |                                   ~~~~^~~~~~~~
    ../spa/plugins/alsa/alsa-seq.c:840:28: note: in expansion of macro ‘SPA_TIMESPEC_TO_NSEC’
      840 |         state->next_time = SPA_TIMESPEC_TO_NSEC(&now);
          |                            ^~~~~~~~~~~~~~~~~~~~
    ../spa/plugins/alsa/alsa-seq.c: In function ‘do_reassign_follower’:
    ../spa/plugins/alsa/alsa-seq.c:836:25: note: ‘now’ declared here
      836 |         struct timespec now;
          |                         ^~~

The reason for these warnings is that spa_system_clock_gettime() may
fail if a version check fails, but the code in question didn't check for
the possible fail. If it failed, then execution would continue, and the
arguments that were passed to the macro will be used uninitialized.

Fix this by checking whether function succeeded.
2021-06-22 22:42:25 +03:00
..
alsa alsa: fix "now.tv_sec maybe used uninitialized" warnings 2021-06-22 22:42:25 +03:00
audioconvert splitter: we always produce output 2021-06-17 18:34:01 +02:00
audiomixer spa: save the old change_mask and restore when emitting full 2021-05-27 15:21:44 +02:00
audiotestsrc spa: save the old change_mask and restore when emitting full 2021-05-27 15:21:44 +02:00
bluez5 bluez5: deal with old libusb versions 2021-06-22 10:58:50 +03:00
control spa: save the old change_mask and restore when emitting full 2021-05-27 15:21:44 +02:00
ffmpeg spa: save the old change_mask and restore when emitting full 2021-05-27 15:21:44 +02:00
jack spa: save the old change_mask and restore when emitting full 2021-05-27 15:21:44 +02:00
libcamera spa: save the old change_mask and restore when emitting full 2021-05-27 15:21:44 +02:00
support meson.build: add -D_GNU_SOURCE to the project arguments 2021-06-09 07:47:51 +00:00
test spa: save the old change_mask and restore when emitting full 2021-05-27 15:21:44 +02:00
v4l2 v4l2: report latency 2021-06-09 17:15:34 +02:00
videoconvert spa: save the old change_mask and restore when emitting full 2021-05-27 15:21:44 +02:00
videotestsrc spa: save the old change_mask and restore when emitting full 2021-05-27 15:21:44 +02:00
volume spa: save the old change_mask and restore when emitting full 2021-05-27 15:21:44 +02:00
vulkan spa: save the old change_mask and restore when emitting full 2021-05-27 15:21:44 +02:00
meson.build meson: fix build if bluez5 option is disabled 2021-05-28 21:01:38 +08:00