Conversation
…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>
Member
Author
|
Merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.