mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
UNUSED -> ATTRIBUTE_UNUSED (follows /usr/include/ansidecl.h)
This commit is contained in:
parent
f981892e3a
commit
b99128d8de
13 changed files with 51 additions and 49 deletions
|
|
@ -9,7 +9,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
const char *snd_strerror( int errnum );
|
||||
const char *snd_strerror(int errnum);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
#define UNUSED __attribute__ ((unused))
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -29,3 +29,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifndef ATTRIBUTE_UNUSED
|
||||
#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -386,7 +386,7 @@ int snd_instr_iwffff_free(snd_instr_iwffff_t *__instr)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static char *look_for_id(snd_iwffff_handle_t *iwf UNUSED, unsigned char *start,
|
||||
static char *look_for_id(snd_iwffff_handle_t *iwf ATTRIBUTE_UNUSED, unsigned char *start,
|
||||
unsigned char *end, ID id)
|
||||
{
|
||||
if (!start)
|
||||
|
|
@ -832,9 +832,9 @@ int snd_instr_iwffff_conv_to_stream(snd_instr_iwffff_t *iwffff,
|
|||
return 0;
|
||||
}
|
||||
|
||||
int snd_instr_iwffff_convert_from_stream(snd_seq_instr_get_t *data UNUSED,
|
||||
size_t size UNUSED,
|
||||
snd_instr_iwffff_t **iwffff UNUSED)
|
||||
int snd_instr_iwffff_convert_from_stream(snd_seq_instr_get_t *data ATTRIBUTE_UNUSED,
|
||||
size_t size ATTRIBUTE_UNUSED,
|
||||
snd_instr_iwffff_t **iwffff ATTRIBUTE_UNUSED)
|
||||
{
|
||||
/* TODO */
|
||||
return -ENXIO;
|
||||
|
|
|
|||
|
|
@ -94,9 +94,9 @@ int snd_instr_simple_convert_to_stream(snd_instr_simple_t *simple,
|
|||
return 0;
|
||||
}
|
||||
|
||||
int snd_instr_simple_convert_from_stream(snd_seq_instr_get_t *__data UNUSED,
|
||||
size_t size UNUSED,
|
||||
snd_instr_simple_t **simple UNUSED)
|
||||
int snd_instr_simple_convert_from_stream(snd_seq_instr_get_t *__data ATTRIBUTE_UNUSED,
|
||||
size_t size ATTRIBUTE_UNUSED,
|
||||
snd_instr_simple_t **simple ATTRIBUTE_UNUSED)
|
||||
{
|
||||
/* TODO */
|
||||
return -ENXIO;
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ static int snd_pcm_hw_state(void *private)
|
|||
return status.state;
|
||||
}
|
||||
|
||||
static ssize_t snd_pcm_hw_frame_io(void *private, int update UNUSED)
|
||||
static ssize_t snd_pcm_hw_frame_io(void *private, int update ATTRIBUTE_UNUSED)
|
||||
{
|
||||
snd_pcm_hw_t *hw = (snd_pcm_hw_t*) private;
|
||||
int fd = hw->fd;
|
||||
|
|
@ -310,21 +310,21 @@ static int snd_pcm_hw_mmap_data(void *private, void **buffer, size_t bsize)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_pcm_hw_munmap_status(void *private UNUSED, snd_pcm_mmap_status_t *status)
|
||||
static int snd_pcm_hw_munmap_status(void *private ATTRIBUTE_UNUSED, snd_pcm_mmap_status_t *status)
|
||||
{
|
||||
if (munmap(status, sizeof(*status)) < 0)
|
||||
return -errno;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int snd_pcm_hw_munmap_control(void *private UNUSED, snd_pcm_mmap_control_t *control)
|
||||
static int snd_pcm_hw_munmap_control(void *private ATTRIBUTE_UNUSED, snd_pcm_mmap_control_t *control)
|
||||
{
|
||||
if (munmap(control, sizeof(*control)) < 0)
|
||||
return -errno;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int snd_pcm_hw_munmap_data(void *private UNUSED, void *buffer, size_t bsize)
|
||||
static int snd_pcm_hw_munmap_data(void *private ATTRIBUTE_UNUSED, void *buffer, size_t bsize)
|
||||
{
|
||||
if (munmap(buffer, bsize) < 0)
|
||||
return -errno;
|
||||
|
|
@ -337,8 +337,8 @@ static int snd_pcm_hw_file_descriptor(void *private)
|
|||
return hw->fd;
|
||||
}
|
||||
|
||||
static int snd_pcm_hw_channels_mask(void *private UNUSED,
|
||||
bitset_t *client_vmask UNUSED)
|
||||
static int snd_pcm_hw_channels_mask(void *private ATTRIBUTE_UNUSED,
|
||||
bitset_t *client_vmask ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -431,7 +431,7 @@ static ssize_t snd_pcm_multi_write_io(snd_pcm_multi_t *multi, size_t count)
|
|||
return frames;
|
||||
}
|
||||
|
||||
static ssize_t snd_pcm_multi_write(void *private, snd_timestamp_t *timestamp UNUSED, const void *buf, size_t count)
|
||||
static ssize_t snd_pcm_multi_write(void *private, snd_timestamp_t *timestamp ATTRIBUTE_UNUSED, const void *buf, size_t count)
|
||||
{
|
||||
snd_pcm_multi_t *multi = (snd_pcm_multi_t*) private;
|
||||
size_t result = 0;
|
||||
|
|
@ -482,7 +482,7 @@ static ssize_t snd_pcm_multi_writev1(snd_pcm_multi_t *multi, const struct iovec
|
|||
return result;
|
||||
}
|
||||
|
||||
static ssize_t snd_pcm_multi_writev(void *private, snd_timestamp_t *timestamp UNUSED, const struct iovec *vector, unsigned long count)
|
||||
static ssize_t snd_pcm_multi_writev(void *private, snd_timestamp_t *timestamp ATTRIBUTE_UNUSED, const struct iovec *vector, unsigned long count)
|
||||
{
|
||||
snd_pcm_multi_t *multi = (snd_pcm_multi_t*) private;
|
||||
snd_pcm_t *handle = multi->handle;
|
||||
|
|
@ -510,15 +510,15 @@ static ssize_t snd_pcm_multi_writev(void *private, snd_timestamp_t *timestamp UN
|
|||
return result;
|
||||
}
|
||||
|
||||
static ssize_t snd_pcm_multi_read(void *private, snd_timestamp_t *timestamp UNUSED, void *buf, size_t count)
|
||||
static ssize_t snd_pcm_multi_read(void *private ATTRIBUTE_UNUSED, snd_timestamp_t *timestamp ATTRIBUTE_UNUSED, void *buf ATTRIBUTE_UNUSED, size_t count ATTRIBUTE_UNUSED)
|
||||
{
|
||||
snd_pcm_multi_t *multi = (snd_pcm_multi_t*) private;
|
||||
// snd_pcm_multi_t *multi = (snd_pcm_multi_t*) private;
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static ssize_t snd_pcm_multi_readv(void *private, snd_timestamp_t *timestamp UNUSED, const struct iovec *vector, unsigned long count)
|
||||
static ssize_t snd_pcm_multi_readv(void *private ATTRIBUTE_UNUSED, snd_timestamp_t *timestamp ATTRIBUTE_UNUSED, const struct iovec *vector ATTRIBUTE_UNUSED, unsigned long count ATTRIBUTE_UNUSED)
|
||||
{
|
||||
snd_pcm_multi_t *multi = (snd_pcm_multi_t*) private;
|
||||
// snd_pcm_multi_t *multi = (snd_pcm_multi_t*) private;
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
|
|
@ -558,7 +558,7 @@ static int snd_pcm_multi_mmap_control(void *private, snd_pcm_mmap_control_t **co
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_pcm_multi_mmap_data(void *private, void **buffer, size_t bsize UNUSED)
|
||||
static int snd_pcm_multi_mmap_data(void *private, void **buffer, size_t bsize ATTRIBUTE_UNUSED)
|
||||
{
|
||||
snd_pcm_multi_t *multi = (snd_pcm_multi_t*) private;
|
||||
unsigned int i;
|
||||
|
|
@ -583,7 +583,7 @@ static int snd_pcm_multi_mmap_data(void *private, void **buffer, size_t bsize UN
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_pcm_multi_munmap_status(void *private, snd_pcm_mmap_status_t *status UNUSED)
|
||||
static int snd_pcm_multi_munmap_status(void *private, snd_pcm_mmap_status_t *status ATTRIBUTE_UNUSED)
|
||||
{
|
||||
snd_pcm_multi_t *multi = (snd_pcm_multi_t*) private;
|
||||
unsigned int i;
|
||||
|
|
@ -597,7 +597,7 @@ static int snd_pcm_multi_munmap_status(void *private, snd_pcm_mmap_status_t *sta
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int snd_pcm_multi_munmap_control(void *private, snd_pcm_mmap_control_t *control UNUSED)
|
||||
static int snd_pcm_multi_munmap_control(void *private, snd_pcm_mmap_control_t *control ATTRIBUTE_UNUSED)
|
||||
{
|
||||
snd_pcm_multi_t *multi = (snd_pcm_multi_t*) private;
|
||||
unsigned int i;
|
||||
|
|
@ -611,7 +611,7 @@ static int snd_pcm_multi_munmap_control(void *private, snd_pcm_mmap_control_t *c
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int snd_pcm_multi_munmap_data(void *private, void *buffer UNUSED, size_t size UNUSED)
|
||||
static int snd_pcm_multi_munmap_data(void *private, void *buffer ATTRIBUTE_UNUSED, size_t size ATTRIBUTE_UNUSED)
|
||||
{
|
||||
snd_pcm_multi_t *multi = (snd_pcm_multi_t*) private;
|
||||
unsigned int i;
|
||||
|
|
|
|||
|
|
@ -377,7 +377,7 @@ static int snd_pcm_plug_pause(void *private, int enable)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int snd_pcm_plug_channel_setup(void *private UNUSED, snd_pcm_channel_setup_t *setup UNUSED)
|
||||
static int snd_pcm_plug_channel_setup(void *private ATTRIBUTE_UNUSED, snd_pcm_channel_setup_t *setup ATTRIBUTE_UNUSED)
|
||||
{
|
||||
/* FIXME: non mmap setups */
|
||||
return -ENXIO;
|
||||
|
|
@ -403,7 +403,7 @@ static ssize_t snd_pcm_plug_frame_data(void *private, off_t offset)
|
|||
return snd_pcm_plug_client_size(plug, ret);
|
||||
}
|
||||
|
||||
ssize_t snd_pcm_plug_writev(void *private, snd_timestamp_t *tstamp UNUSED, const struct iovec *vector, unsigned long count)
|
||||
ssize_t snd_pcm_plug_writev(void *private, snd_timestamp_t *tstamp ATTRIBUTE_UNUSED, const struct iovec *vector, unsigned long count)
|
||||
{
|
||||
snd_pcm_plug_t *plug = (snd_pcm_plug_t*) private;
|
||||
snd_pcm_t *handle = plug->handle;
|
||||
|
|
@ -447,7 +447,7 @@ ssize_t snd_pcm_plug_writev(void *private, snd_timestamp_t *tstamp UNUSED, const
|
|||
return result;
|
||||
}
|
||||
|
||||
ssize_t snd_pcm_plug_readv(void *private, snd_timestamp_t *tstamp UNUSED, const struct iovec *vector, unsigned long count)
|
||||
ssize_t snd_pcm_plug_readv(void *private, snd_timestamp_t *tstamp ATTRIBUTE_UNUSED, const struct iovec *vector, unsigned long count)
|
||||
{
|
||||
snd_pcm_plug_t *plug = (snd_pcm_plug_t*) private;
|
||||
snd_pcm_t *handle = plug->handle;
|
||||
|
|
@ -491,7 +491,7 @@ ssize_t snd_pcm_plug_readv(void *private, snd_timestamp_t *tstamp UNUSED, const
|
|||
return result;
|
||||
}
|
||||
|
||||
ssize_t snd_pcm_plug_write(void *private, snd_timestamp_t *tstamp UNUSED, const void *buf, size_t count)
|
||||
ssize_t snd_pcm_plug_write(void *private, snd_timestamp_t *tstamp ATTRIBUTE_UNUSED, const void *buf, size_t count)
|
||||
{
|
||||
snd_pcm_plug_t *plug = (snd_pcm_plug_t*) private;
|
||||
snd_pcm_t *handle = plug->handle;
|
||||
|
|
@ -525,7 +525,7 @@ ssize_t snd_pcm_plug_write(void *private, snd_timestamp_t *tstamp UNUSED, const
|
|||
return size;
|
||||
}
|
||||
|
||||
ssize_t snd_pcm_plug_read(void *private, snd_timestamp_t *tstamp UNUSED, void *buf, size_t count)
|
||||
ssize_t snd_pcm_plug_read(void *private, snd_timestamp_t *tstamp ATTRIBUTE_UNUSED, void *buf, size_t count)
|
||||
{
|
||||
snd_pcm_plug_t *plug = (snd_pcm_plug_t*) private;
|
||||
snd_pcm_t *handle = plug->handle;
|
||||
|
|
@ -559,32 +559,32 @@ ssize_t snd_pcm_plug_read(void *private, snd_timestamp_t *tstamp UNUSED, void *b
|
|||
return size;
|
||||
}
|
||||
|
||||
static int snd_pcm_plug_mmap_status(void *private UNUSED, snd_pcm_mmap_status_t **status UNUSED)
|
||||
static int snd_pcm_plug_mmap_status(void *private ATTRIBUTE_UNUSED, snd_pcm_mmap_status_t **status ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return -EBADFD;
|
||||
}
|
||||
|
||||
static int snd_pcm_plug_mmap_control(void *private UNUSED, snd_pcm_mmap_control_t **control UNUSED)
|
||||
static int snd_pcm_plug_mmap_control(void *private ATTRIBUTE_UNUSED, snd_pcm_mmap_control_t **control ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return -EBADFD;
|
||||
}
|
||||
|
||||
static int snd_pcm_plug_mmap_data(void *private UNUSED, void **buffer UNUSED, size_t bsize UNUSED)
|
||||
static int snd_pcm_plug_mmap_data(void *private ATTRIBUTE_UNUSED, void **buffer ATTRIBUTE_UNUSED, size_t bsize ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return -EBADFD;
|
||||
}
|
||||
|
||||
static int snd_pcm_plug_munmap_status(void *private UNUSED, snd_pcm_mmap_status_t *status UNUSED)
|
||||
static int snd_pcm_plug_munmap_status(void *private ATTRIBUTE_UNUSED, snd_pcm_mmap_status_t *status ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return -EBADFD;
|
||||
}
|
||||
|
||||
static int snd_pcm_plug_munmap_control(void *private UNUSED, snd_pcm_mmap_control_t *control UNUSED)
|
||||
static int snd_pcm_plug_munmap_control(void *private ATTRIBUTE_UNUSED, snd_pcm_mmap_control_t *control ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return -EBADFD;
|
||||
}
|
||||
|
||||
static int snd_pcm_plug_munmap_data(void *private UNUSED, void *buffer UNUSED, size_t size UNUSED)
|
||||
static int snd_pcm_plug_munmap_data(void *private ATTRIBUTE_UNUSED, void *buffer ATTRIBUTE_UNUSED, size_t size ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return -EBADFD;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -356,7 +356,7 @@ static ssize_t adpcm_transfer(snd_pcm_plugin_t *plugin,
|
|||
|
||||
static int adpcm_action(snd_pcm_plugin_t * plugin,
|
||||
snd_pcm_plugin_action_t action,
|
||||
unsigned long udata UNUSED)
|
||||
unsigned long udata ATTRIBUTE_UNUSED)
|
||||
{
|
||||
assert(plugin);
|
||||
switch (action) {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
|
||||
static ssize_t io_playback_transfer(snd_pcm_plugin_t *plugin,
|
||||
const snd_pcm_plugin_channel_t *src_channels,
|
||||
snd_pcm_plugin_channel_t *dst_channels UNUSED,
|
||||
snd_pcm_plugin_channel_t *dst_channels ATTRIBUTE_UNUSED,
|
||||
size_t frames)
|
||||
{
|
||||
struct iovec *vec;
|
||||
|
|
@ -73,7 +73,7 @@ static ssize_t io_playback_transfer(snd_pcm_plugin_t *plugin,
|
|||
}
|
||||
|
||||
static ssize_t io_capture_transfer(snd_pcm_plugin_t *plugin,
|
||||
const snd_pcm_plugin_channel_t *src_channels UNUSED,
|
||||
const snd_pcm_plugin_channel_t *src_channels ATTRIBUTE_UNUSED,
|
||||
snd_pcm_plugin_channel_t *dst_channels,
|
||||
size_t frames)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ static ssize_t mmap_dst_channels(snd_pcm_plugin_t *plugin,
|
|||
|
||||
static ssize_t mmap_playback_transfer(snd_pcm_plugin_t *plugin,
|
||||
const snd_pcm_plugin_channel_t *src_channels,
|
||||
snd_pcm_plugin_channel_t *dst_channels UNUSED,
|
||||
snd_pcm_plugin_channel_t *dst_channels ATTRIBUTE_UNUSED,
|
||||
size_t frames)
|
||||
{
|
||||
mmap_t *data;
|
||||
|
|
@ -203,8 +203,8 @@ static ssize_t mmap_playback_transfer(snd_pcm_plugin_t *plugin,
|
|||
}
|
||||
|
||||
static ssize_t mmap_capture_transfer(snd_pcm_plugin_t *plugin,
|
||||
const snd_pcm_plugin_channel_t *src_channels UNUSED,
|
||||
snd_pcm_plugin_channel_t *dst_channels UNUSED,
|
||||
const snd_pcm_plugin_channel_t *src_channels ATTRIBUTE_UNUSED,
|
||||
snd_pcm_plugin_channel_t *dst_channels ATTRIBUTE_UNUSED,
|
||||
size_t frames)
|
||||
{
|
||||
mmap_t *data;
|
||||
|
|
@ -225,7 +225,7 @@ static ssize_t mmap_capture_transfer(snd_pcm_plugin_t *plugin,
|
|||
|
||||
static int mmap_action(snd_pcm_plugin_t *plugin,
|
||||
snd_pcm_plugin_action_t action,
|
||||
unsigned long udata UNUSED)
|
||||
unsigned long udata ATTRIBUTE_UNUSED)
|
||||
{
|
||||
struct mmap_private_data *data;
|
||||
snd_pcm_t *stream;
|
||||
|
|
@ -258,7 +258,7 @@ static int mmap_action(snd_pcm_plugin_t *plugin,
|
|||
return 0; /* silenty ignore other actions */
|
||||
}
|
||||
|
||||
static void mmap_free(snd_pcm_plugin_t *plugin, void *private_data UNUSED)
|
||||
static void mmap_free(snd_pcm_plugin_t *plugin, void *private_data ATTRIBUTE_UNUSED)
|
||||
{
|
||||
struct mmap_private_data *data;
|
||||
|
||||
|
|
|
|||
|
|
@ -327,7 +327,7 @@ static ssize_t rate_transfer(snd_pcm_plugin_t *plugin,
|
|||
|
||||
static int rate_action(snd_pcm_plugin_t *plugin,
|
||||
snd_pcm_plugin_action_t action,
|
||||
unsigned long udata UNUSED)
|
||||
unsigned long udata ATTRIBUTE_UNUSED)
|
||||
{
|
||||
assert(plugin);
|
||||
switch (action) {
|
||||
|
|
|
|||
|
|
@ -84,9 +84,9 @@ typedef union {
|
|||
|
||||
|
||||
static void route_to_channel_from_zero(snd_pcm_plugin_t *plugin,
|
||||
const snd_pcm_plugin_channel_t *src_channels UNUSED,
|
||||
const snd_pcm_plugin_channel_t *src_channels ATTRIBUTE_UNUSED,
|
||||
snd_pcm_plugin_channel_t *dst_channel,
|
||||
ttable_dst_t* ttable UNUSED, size_t frames)
|
||||
ttable_dst_t* ttable ATTRIBUTE_UNUSED, size_t frames)
|
||||
{
|
||||
if (dst_channel->wanted)
|
||||
snd_pcm_area_silence(&dst_channel->area, 0, frames, plugin->dst_format.format);
|
||||
|
|
@ -410,7 +410,7 @@ int route_dst_channels_mask(snd_pcm_plugin_t *plugin,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void route_free(snd_pcm_plugin_t *plugin, void* private_data UNUSED)
|
||||
static void route_free(snd_pcm_plugin_t *plugin, void* private_data ATTRIBUTE_UNUSED)
|
||||
{
|
||||
route_t *data = (route_t *)plugin->extra_data;
|
||||
unsigned int dst_channel;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue