Skip to content

Conversation

@takaswie
Copy link
Member

As long as building on Ubuntu 25.04, some codes takes warnings from gcc 14 and gi-docgen 2025.3-1. This patchset includes some fixes to solve the codes.

takaswie added 3 commits July 12, 2025 21:31
…character device

When failing detecting devnode of ALSA Timer character device, the helper
function returns negative value to the callers. This is overlooked in the
previous code refactoring. It should return FALSE.

This bug brings the following compiler warnings:

../src/timer/query.c: In function ‘alsatimer_get_device_id_list’:
../src/timer/query.c:122:13: warning: ‘fd’ may be used uninitialized [-Wmaybe-uninitialized]
  122 |         if (ioctl(fd, SNDRV_TIMER_IOCTL_NEXT_DEVICE, &id) < 0) {
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/timer/query.c:109:9: note: ‘fd’ was declared here
  109 |     int fd;
      |         ^~

This commit fixes the bug.

Fixes: 487c67a ("timer: query: rewrite public API to return gboolean according to GNOME convention")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
…r character device

When failing detecting devnode of ALSA Sequencer character device, the
helper function returns negative value to the callers. This is overlooked
in the previous code refactoring. It should return FALSE.

This bug brings the following compiler warnings:

../src/seq/query.c: In function ‘alsaseq_get_system_info’:
../src/seq/query.c:113:9: warning: ‘fd’ may be used uninitialized [-Wmaybe-uninitialized]
  113 |     if (ioctl(fd, SNDRV_SEQ_IOCTL_SYSTEM_INFO, info) < 0) {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/seq/query.c:101:9: note: ‘fd’ was declared here
  101 |     int fd;
      |

This commit fixes the bug.

Fixes: 31eb1a6 ("seq: query: rewrite public API to return gboolean according to GNOME convention")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
As long as building with gi-docgen 2025.3.1 in Ubuntu 25.04, some
annotations for SlaveClass become invalid and causes some warnings.

/usr/bin/gi-docgen generate --no-namespace-dir --config=doc/timer/alsatimer.toml --output-dir=doc/timer/alsatimer --content-dir=/home/mocchi/git/alsa-project.org/alsa-gobject/doc/timer src/timer/ALSATimer-0.0.gir
WARNING: Unknown namespace SlaveClass
slave_id. If the slave_class is [enum@SlaveClass.APPLICATION], the slave_id is for the PID of
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
WARNING: Unknown namespace SlaveClass
[enum@SlaveClass.SEQUENCER], the slave_id is the numeric ID of queue bound for timer device.
^~~~~~~~~~~~~~~~~~~~~~~~~~~
WARNING: Unknown namespace SlaveClass
slave_id. If the slave_class is [enum@SlaveClass.APPLICATION], the slave_id is for the PID of
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
WARNING: Unknown namespace SlaveClass
[enum@SlaveClass.SEQUENCER], the slave_id is the numeric ID of queue bound for timer device.
^~~~~~~~~~~~~~~~~~~~~~~~~~~
WARNING: Unknown namespace SlaveClass
slave_id. If the slave_class is [enum@SlaveClass.APPLICATION], the slave_id is for the PID of
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
WARNING: Unknown namespace SlaveClass
[enum@SlaveClass.SEQUENCER], the slave_id is the numeric ID of queue bound for timer device.
^~~~~~~~~~~~~~~~~~~~~~~~~~~

This commit suppresses the warnings by using the pattern of enum@class.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
@takaswie takaswie requested a review from a team July 12, 2025 12:42
@takaswie takaswie self-assigned this Jul 12, 2025
@takaswie takaswie added the bug Something isn't working label Jul 12, 2025
@takaswie takaswie merged commit fd5ec7b into master Jul 13, 2025
4 checks passed
@takaswie takaswie deleted the topic/minor-fixes branch July 13, 2025 07:42
@takaswie
Copy link
Member Author

Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants