Project

General

Profile

Bug #12361

audio: variable may be used uninitialized

Added by Toomas Soome 3 months ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
driver - device drivers
Start date:
Due date:
% Done:

90%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Build errors with gcc 9:

    ../../common/io/audio/impl/audio_oss.c: In function 'sndctl_dsp_setfmt':
    ../../common/io/audio/impl/audio_oss.c:651:11: error: 'fmt' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      651 |    (void) auclnt_set_format(auclnt_input_stream(c), fmt);
          |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../common/io/audio/impl/audio_oss.c: In function 'oss_ioctl':
    ../../common/io/audio/impl/audio_oss.c:1674:13: error: 'data' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     1674 |   if ((rv = ddi_copyin((void *)arg, data, sz, mode)) != 0) {
          |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../common/io/audio/impl/audio_oss.c: In function 'ossmix_ioctl':
    ../../common/io/audio/impl/audio_oss.c:2191:13: error: 'data' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     2191 |   if ((rv = ddi_copyin((void *)arg, data, sz, mode)) != 0) {
          |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    ../../common/io/audio/impl/audio_ddi.c: In function 'audio_strclose':
    ../../common/io/audio/impl/audio_ddi.c:298:9: error: 'rv' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      298 |  return (rv);
          |         ^

    cc1: all warnings being treated as errors

Also available in: Atom PDF