Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
8e331cfc
Commit
8e331cfc
authored
Aug 02, 2012
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gcc.h: re-add gcc_const and gcc_pure
Remove GLib dependency from some headers.
parent
edf811fa
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
123 additions
and
92 deletions
+123
-92
DatabasePlugin.hxx
src/DatabasePlugin.hxx
+2
-5
audio_check.h
src/audio_check.h
+1
-1
audio_format.h
src/audio_format.h
+10
-9
client.h
src/client.h
+9
-6
client_file.h
src/client_file.h
+4
-2
client_message.h
src/client_message.h
+5
-4
client_subscribe.h
src/client_subscribe.h
+4
-2
command.h
src/command.h
+0
-1
database.h
src/database.h
+5
-5
SimpleDatabasePlugin.hxx
src/db/SimpleDatabasePlugin.hxx
+4
-5
_flac_common.h
src/decoder/_flac_common.h
+0
-2
gcc.h
src/gcc.h
+19
-0
ls.c
src/ls.c
+2
-0
mapper.h
src/mapper.h
+12
-11
httpd_client.h
src/output/httpd_client.h
+1
-2
output_plugin.h
src/output_plugin.h
+3
-4
pcm_mix.h
src/pcm_mix.h
+2
-1
pcm_volume.h
src/pcm_volume.h
+1
-0
pipe.h
src/pipe.h
+6
-5
result.h
src/protocol/result.h
+2
-3
resolver.h
src/resolver.h
+4
-2
string_util.h
src/string_util.h
+4
-4
strset.c
src/strset.c
+2
-0
strset.h
src/strset.h
+4
-2
tag_id3.h
src/tag_id3.h
+4
-5
update_archive.h
src/update_archive.h
+5
-4
uri.h
src/uri.h
+5
-5
bit_reverse.h
src/util/bit_reverse.h
+3
-2
No files found.
src/DatabasePlugin.hxx
View file @
8e331cfc
...
...
@@ -27,10 +27,7 @@
#define MPD_DATABASE_PLUGIN_HXX
#include "DatabaseVisitor.hxx"
#include <glib.h>
#include <assert.h>
#include <stdbool.h>
#include "gcc.h"
struct
config_param
;
struct
db_selection
;
...
...
@@ -46,7 +43,7 @@ public:
/**
* Open the database. Read it into memory if applicable.
*/
virtual
bool
Open
(
G_GNUC_UNUSED
GError
**
error_r
)
{
virtual
bool
Open
(
gcc_unused
GError
**
error_r
)
{
return
true
;
}
...
...
src/audio_check.h
View file @
8e331cfc
...
...
@@ -28,7 +28,7 @@
/**
* The GLib quark used for errors reported by this library.
*/
G_GNUC_CONST
gcc_const
static
inline
GQuark
audio_format_quark
(
void
)
{
...
...
src/audio_format.h
View file @
8e331cfc
...
...
@@ -20,7 +20,8 @@
#ifndef MPD_AUDIO_FORMAT_H
#define MPD_AUDIO_FORMAT_H
#include <glib.h>
#include "gcc.h"
#include <stdint.h>
#include <stdbool.h>
#include <assert.h>
...
...
@@ -189,7 +190,7 @@ audio_valid_channel_count(unsigned channels)
* Returns false if the format is not valid for playback with MPD.
* This function performs some basic validity checks.
*/
G_GNUC_PURE
gcc_pure
static
inline
bool
audio_format_valid
(
const
struct
audio_format
*
af
)
{
return
audio_valid_sample_rate
(
af
->
sample_rate
)
&&
...
...
@@ -201,7 +202,7 @@ static inline bool audio_format_valid(const struct audio_format *af)
* Returns false if the format mask is not valid for playback with
* MPD. This function performs some basic validity checks.
*/
G_GNUC_PURE
gcc_pure
static
inline
bool
audio_format_mask_valid
(
const
struct
audio_format
*
af
)
{
return
(
af
->
sample_rate
==
0
||
...
...
@@ -223,7 +224,7 @@ void
audio_format_mask_apply
(
struct
audio_format
*
af
,
const
struct
audio_format
*
mask
);
G_GNUC_CONST
gcc_const
static
inline
unsigned
sample_format_size
(
enum
sample_format
format
)
{
...
...
@@ -254,7 +255,7 @@ sample_format_size(enum sample_format format)
/**
* Returns the size of each (mono) sample in bytes.
*/
G_GNUC_PURE
gcc_pure
static
inline
unsigned
audio_format_sample_size
(
const
struct
audio_format
*
af
)
{
return
sample_format_size
((
enum
sample_format
)
af
->
format
);
...
...
@@ -263,7 +264,7 @@ static inline unsigned audio_format_sample_size(const struct audio_format *af)
/**
* Returns the size of each full frame in bytes.
*/
G_GNUC_PURE
gcc_pure
static
inline
unsigned
audio_format_frame_size
(
const
struct
audio_format
*
af
)
{
...
...
@@ -274,7 +275,7 @@ audio_format_frame_size(const struct audio_format *af)
* Returns the floating point factor which converts a time span to a
* storage size in bytes.
*/
G_GNUC_PURE
gcc_pure
static
inline
double
audio_format_time_to_size
(
const
struct
audio_format
*
af
)
{
return
af
->
sample_rate
*
audio_format_frame_size
(
af
);
...
...
@@ -287,7 +288,7 @@ static inline double audio_format_time_to_size(const struct audio_format *af)
* @param format a #sample_format enum value
* @return the string
*/
G_GNUC_PURE
G_GNUC_MALLOC
gcc_pure
gcc_malloc
const
char
*
sample_format_to_string
(
enum
sample_format
format
);
...
...
@@ -299,7 +300,7 @@ sample_format_to_string(enum sample_format format);
* @param s a buffer to print into
* @return the string, or NULL if the #audio_format object is invalid
*/
G_GNUC_PURE
G_GNUC_MALLOC
gcc_pure
gcc_malloc
const
char
*
audio_format_to_string
(
const
struct
audio_format
*
af
,
struct
audio_format_string
*
s
);
...
...
src/client.h
View file @
8e331cfc
...
...
@@ -20,7 +20,8 @@
#ifndef MPD_CLIENT_H
#define MPD_CLIENT_H
#include <glib.h>
#include "gcc.h"
#include <stdbool.h>
#include <stddef.h>
#include <stdarg.h>
...
...
@@ -35,28 +36,28 @@ void client_manager_deinit(void);
void
client_new
(
struct
player_control
*
player_control
,
int
fd
,
const
struct
sockaddr
*
sa
,
size_t
sa_length
,
int
uid
);
G_GNUC_PURE
gcc_pure
bool
client_is_expired
(
const
struct
client
*
client
);
/**
* returns the uid of the client process, or a negative value if the
* uid is unknown
*/
G_GNUC_PURE
gcc_pure
int
client_get_uid
(
const
struct
client
*
client
);
/**
* Is this client running on the same machine, connected with a local
* (UNIX domain) socket?
*/
G_GNUC_PURE
gcc_pure
static
inline
bool
client_is_local
(
const
struct
client
*
client
)
{
return
client_get_uid
(
client
)
>
0
;
}
G_GNUC_PURE
gcc_pure
unsigned
client_get_permission
(
const
struct
client
*
client
);
void
client_set_permission
(
struct
client
*
client
,
unsigned
permission
);
...
...
@@ -74,6 +75,8 @@ void client_vprintf(struct client *client, const char *fmt, va_list args);
/**
* Write a printf-like formatted string to the client.
*/
G_GNUC_PRINTF
(
2
,
3
)
void
client_printf
(
struct
client
*
client
,
const
char
*
fmt
,
...);
gcc_fprintf
void
client_printf
(
struct
client
*
client
,
const
char
*
fmt
,
...);
#endif
src/client_file.h
View file @
8e331cfc
...
...
@@ -20,7 +20,9 @@
#ifndef MPD_CLIENT_FILE_H
#define MPD_CLIENT_FILE_H
#include <glib.h>
#include "gcc.h"
#include "gerror.h"
#include <stdbool.h>
struct
client
;
...
...
@@ -35,7 +37,7 @@ struct client;
* @param path_fs the absolute path name in filesystem encoding
* @return true if access is allowed
*/
G_GNUC_PURE
gcc_pure
bool
client_allow_file
(
const
struct
client
*
client
,
const
char
*
path_fs
,
GError
**
error_r
);
...
...
src/client_message.h
View file @
8e331cfc
...
...
@@ -20,10 +20,11 @@
#ifndef MPD_CLIENT_MESSAGE_H
#define MPD_CLIENT_MESSAGE_H
#include "gcc.h"
#include <assert.h>
#include <stdbool.h>
#include <stddef.h>
#include <glib.h>
/**
* A client-to-client message.
...
...
@@ -34,11 +35,11 @@ struct client_message {
char
*
message
;
};
G_GNUC_PURE
gcc_pure
bool
client_message_valid_channel_name
(
const
char
*
name
);
G_GNUC_PURE
gcc_pure
static
inline
bool
client_message_defined
(
const
struct
client_message
*
msg
)
{
...
...
@@ -59,7 +60,7 @@ void
client_message_copy
(
struct
client_message
*
dest
,
const
struct
client_message
*
src
);
G_GNUC_MALLOC
gcc_malloc
struct
client_message
*
client_message_dup
(
const
struct
client_message
*
src
);
...
...
src/client_subscribe.h
View file @
8e331cfc
...
...
@@ -20,9 +20,11 @@
#ifndef MPD_CLIENT_SUBSCRIBE_H
#define MPD_CLIENT_SUBSCRIBE_H
#include "gcc.h"
#include <stdbool.h>
#include <glib.h>
typedef
struct
_GSList
GSList
;
struct
client
;
struct
client_message
;
...
...
@@ -52,7 +54,7 @@ client_unsubscribe_all(struct client *client);
bool
client_push_message
(
struct
client
*
client
,
const
struct
client_message
*
msg
);
G_GNUC_MALLOC
gcc_malloc
GSList
*
client_read_messages
(
struct
client
*
client
);
...
...
src/command.h
View file @
8e331cfc
...
...
@@ -22,7 +22,6 @@
#include "ack.h"
#include <glib.h>
#include <stdbool.h>
enum
command_return
{
...
...
src/database.h
View file @
8e331cfc
...
...
@@ -47,7 +47,7 @@ db_finish(void);
* Returns the root directory object. Returns NULL if there is no
* configured music directory.
*/
G_GNUC_PURE
gcc_pure
struct
directory
*
db_get_root
(
void
);
...
...
@@ -55,12 +55,12 @@ db_get_root(void);
* Caller must lock the #db_mutex.
*/
gcc_nonnull
(
1
)
G_GNUC_PURE
gcc_pure
struct
directory
*
db_get_directory
(
const
char
*
name
);
gcc_nonnull
(
1
)
G_GNUC_PURE
gcc_pure
struct
song
*
db_get_song
(
const
char
*
file
);
...
...
@@ -82,14 +82,14 @@ db_save(GError **error_r);
bool
db_load
(
GError
**
error
);
G_GNUC_PURE
gcc_pure
time_t
db_get_mtime
(
void
);
/**
* Returns true if there is a valid database file on the disk.
*/
G_GNUC_PURE
gcc_pure
static
inline
bool
db_exists
(
void
)
{
...
...
src/db/SimpleDatabasePlugin.hxx
View file @
8e331cfc
...
...
@@ -26,7 +26,6 @@
#include <cassert>
#include <string>
#include <glib.h>
#include <stdbool.h>
#include <time.h>
...
...
@@ -40,7 +39,7 @@ class SimpleDatabase : public Database {
time_t
mtime
;
public
:
G_GNUC_PURE
gcc_pure
struct
directory
*
GetRoot
()
{
assert
(
root
!=
NULL
);
...
...
@@ -49,7 +48,7 @@ public:
bool
Save
(
GError
**
error_r
);
G_GNUC_PURE
gcc_pure
time_t
GetLastModified
()
const
{
return
mtime
;
}
...
...
@@ -70,12 +69,12 @@ public:
protected
:
bool
Configure
(
const
struct
config_param
*
param
,
GError
**
error_r
);
G_GNUC_PURE
gcc_pure
bool
Check
(
GError
**
error_r
)
const
;
bool
Load
(
GError
**
error_r
);
G_GNUC_PURE
gcc_pure
const
struct
directory
*
LookupDirectory
(
const
char
*
uri
)
const
;
};
...
...
src/decoder/_flac_common.h
View file @
8e331cfc
...
...
@@ -27,8 +27,6 @@
#include "decoder_api.h"
#include "pcm_buffer.h"
#include <glib.h>
#include <FLAC/stream_decoder.h>
#include <FLAC/metadata.h>
...
...
src/gcc.h
View file @
8e331cfc
...
...
@@ -32,6 +32,9 @@
*/
#if GCC_CHECK_VERSION(3,0)
# define gcc_const __attribute__((const))
# define gcc_pure __attribute__((pure))
# define gcc_malloc __attribute__((malloc))
# define gcc_must_check __attribute__ ((warn_unused_result))
# define gcc_packed __attribute__ ((packed))
/* these are very useful for type checking */
...
...
@@ -41,11 +44,21 @@
# define gcc_fprintf__ __attribute__ ((format(printf,4,5)))
# define gcc_scanf __attribute__ ((format(scanf,1,2)))
# define gcc_used __attribute__ ((used))
# define gcc_unused __attribute__((unused))
# define gcc_warn_unused_result __attribute__((warn_unused_result))
/* # define inline inline __attribute__ ((always_inline)) */
# define gcc_noinline __attribute__ ((noinline))
# define gcc_nonnull(...) __attribute__((nonnull(__VA_ARGS__)))
# define gcc_nonnull_all __attribute__((nonnull))
# define gcc_likely(x) __builtin_expect (!!(x), 1)
# define gcc_unlikely(x) __builtin_expect (!!(x), 0)
#else
# define gcc_unused
# define gcc_const
# define gcc_pure
# define gcc_malloc
# define gcc_must_check
# define gcc_packed
# define gcc_printf
...
...
@@ -54,10 +67,16 @@
# define gcc_fprintf__
# define gcc_scanf
# define gcc_used
# define gcc_unused
# define gcc_warn_unused_result
/* # define inline */
# define gcc_noinline
# define gcc_nonnull(...)
# define gcc_nonnull_all
# define gcc_likely(x) (x)
# define gcc_unlikely(x) (x)
#endif
#ifdef __cplusplus
...
...
src/ls.c
View file @
8e331cfc
...
...
@@ -22,6 +22,8 @@
#include "uri.h"
#include "client.h"
#include <glib.h>
#include <assert.h>
#include <string.h>
...
...
src/mapper.h
View file @
8e331cfc
...
...
@@ -24,10 +24,11 @@
#ifndef MPD_MAPPER_H
#define MPD_MAPPER_H
#include "gcc.h"
#include "gerror.h"
#include <glib.h>
#include <stdbool.h>
#include <stddef.h>
#define PLAYLIST_FILE_SUFFIX ".m3u"
...
...
@@ -38,14 +39,14 @@ void mapper_init(const char *_music_dir, const char *_playlist_dir);
void
mapper_finish
(
void
);
G_GNUC_CONST
gcc_const
const
char
*
mapper_get_music_directory
(
void
);
/**
* Returns true if a music directory was configured.
*/
G_GNUC_CONST
gcc_const
static
inline
bool
mapper_has_music_directory
(
void
)
{
...
...
@@ -57,7 +58,7 @@ mapper_has_music_directory(void)
* this function converts it to a relative path. If not, it returns
* the unmodified string pointer.
*/
G_GNUC_PURE
gcc_pure
const
char
*
map_to_relative_path
(
const
char
*
path_utf8
);
...
...
@@ -66,7 +67,7 @@ map_to_relative_path(const char *path_utf8);
* is basically done by converting the URI to the file system charset
* and prepending the music directory.
*/
G_GNUC_MALLOC
gcc_malloc
char
*
map_uri_fs
(
const
char
*
uri
);
...
...
@@ -76,7 +77,7 @@ map_uri_fs(const char *uri);
* @param directory the directory object
* @return the path in file system encoding, or NULL if mapping failed
*/
G_GNUC_MALLOC
gcc_malloc
char
*
map_directory_fs
(
const
struct
directory
*
directory
);
...
...
@@ -88,7 +89,7 @@ map_directory_fs(const struct directory *directory);
* @param name the child's name in UTF-8
* @return the path in file system encoding, or NULL if mapping failed
*/
G_GNUC_MALLOC
gcc_malloc
char
*
map_directory_child_fs
(
const
struct
directory
*
directory
,
const
char
*
name
);
...
...
@@ -99,7 +100,7 @@ map_directory_child_fs(const struct directory *directory, const char *name);
* @param song the song object
* @return the path in file system encoding, or NULL if mapping failed
*/
G_GNUC_MALLOC
gcc_malloc
char
*
map_song_fs
(
const
struct
song
*
song
);
...
...
@@ -110,14 +111,14 @@ map_song_fs(const struct song *song);
* @param path_fs a path in file system encoding
* @return the relative path in UTF-8, or NULL if mapping failed
*/
G_GNUC_MALLOC
gcc_malloc
char
*
map_fs_to_utf8
(
const
char
*
path_fs
);
/**
* Returns the playlist directory.
*/
G_GNUC_CONST
gcc_const
const
char
*
map_spl_path
(
void
);
...
...
@@ -128,7 +129,7 @@ map_spl_path(void);
*
* @return the path in file system encoding, or NULL if mapping failed
*/
G_GNUC_PURE
gcc_pure
char
*
map_spl_utf8_to_fs
(
const
char
*
name
);
...
...
src/output/httpd_client.h
View file @
8e331cfc
...
...
@@ -20,9 +20,8 @@
#ifndef MPD_OUTPUT_HTTPD_CLIENT_H
#define MPD_OUTPUT_HTTPD_CLIENT_H
#include <glib.h>
#include <stdbool.h>
#include <stddef.h>
struct
httpd_client
;
struct
httpd_output
;
...
...
src/output_plugin.h
View file @
8e331cfc
...
...
@@ -20,10 +20,9 @@
#ifndef MPD_OUTPUT_PLUGIN_H
#define MPD_OUTPUT_PLUGIN_H
#include "gcc.h"
#include "gerror.h"
#include <glib.h>
#include <stdbool.h>
#include <stddef.h>
...
...
@@ -167,7 +166,7 @@ ao_plugin_test_default_device(const struct audio_output_plugin *plugin)
:
false
;
}
G_GNUC_MALLOC
gcc_malloc
struct
audio_output
*
ao_plugin_init
(
const
struct
audio_output_plugin
*
plugin
,
const
struct
config_param
*
param
,
...
...
@@ -189,7 +188,7 @@ ao_plugin_open(struct audio_output *ao, struct audio_format *audio_format,
void
ao_plugin_close
(
struct
audio_output
*
ao
);
G_GNUC_PURE
gcc_pure
unsigned
ao_plugin_delay
(
struct
audio_output
*
ao
);
...
...
src/pcm_mix.h
View file @
8e331cfc
...
...
@@ -21,6 +21,7 @@
#define PCM_MIX_H
#include "audio_format.h"
#include "gcc.h"
#include <stdbool.h>
#include <stddef.h>
...
...
@@ -41,7 +42,7 @@
*
* @return true on success, false if the format is not supported
*/
G_GNUC_WARN_UNUSED_RESULT
gcc_warn_unused_result
bool
pcm_mix
(
void
*
buffer1
,
const
void
*
buffer2
,
size_t
size
,
enum
sample_format
format
,
float
portion1
);
...
...
src/pcm_volume.h
View file @
8e331cfc
...
...
@@ -25,6 +25,7 @@
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
enum
{
/** this value means "100% volume" */
...
...
src/pipe.h
View file @
8e331cfc
...
...
@@ -20,7 +20,8 @@
#ifndef MPD_PIPE_H
#define MPD_PIPE_H
#include <glib.h>
#include "gcc.h"
#include <stdbool.h>
#ifndef NDEBUG
...
...
@@ -39,7 +40,7 @@ struct music_pipe;
/**
* Creates a new #music_pipe object. It is empty.
*/
G_GNUC_MALLOC
gcc_malloc
struct
music_pipe
*
music_pipe_new
(
void
);
...
...
@@ -72,7 +73,7 @@ music_pipe_contains(const struct music_pipe *mp,
* Returns the first #music_chunk from the pipe. Returns NULL if the
* pipe is empty.
*/
G_GNUC_PURE
gcc_pure
const
struct
music_chunk
*
music_pipe_peek
(
const
struct
music_pipe
*
mp
);
...
...
@@ -99,11 +100,11 @@ music_pipe_push(struct music_pipe *mp, struct music_chunk *chunk);
/**
* Returns the number of chunks currently in this pipe.
*/
G_GNUC_PURE
gcc_pure
unsigned
music_pipe_size
(
const
struct
music_pipe
*
mp
);
G_GNUC_PURE
gcc_pure
static
inline
bool
music_pipe_empty
(
const
struct
music_pipe
*
mp
)
{
...
...
src/protocol/result.h
View file @
8e331cfc
...
...
@@ -21,10 +21,9 @@
#define MPD_PROTOCOL_RESULT_H
#include "check.h"
#include "gcc.h"
#include "ack.h"
#include <glib.h>
struct
client
;
extern
const
char
*
current_command
;
...
...
@@ -37,7 +36,7 @@ void
command_error_v
(
struct
client
*
client
,
enum
ack
error
,
const
char
*
fmt
,
va_list
args
);
G_GNUC_PRINTF
(
3
,
4
)
gcc_fprintf_
void
command_error
(
struct
client
*
client
,
enum
ack
error
,
const
char
*
fmt
,
...);
...
...
src/resolver.h
View file @
8e331cfc
...
...
@@ -20,12 +20,14 @@
#ifndef MPD_RESOLVER_H
#define MPD_RESOLVER_H
#include "gcc.h"
#include <glib.h>
struct
sockaddr
;
struct
addrinfo
;
G_GNUC_CONST
gcc_const
static
inline
GQuark
resolver_quark
(
void
)
{
...
...
@@ -42,7 +44,7 @@ resolver_quark(void)
* @param error location to store the error occurring, or NULL to
* ignore errors
*/
G_GNUC_MALLOC
gcc_malloc
char
*
sockaddr_to_string
(
const
struct
sockaddr
*
sa
,
size_t
length
,
GError
**
error
);
...
...
src/string_util.h
View file @
8e331cfc
...
...
@@ -20,7 +20,7 @@
#ifndef MPD_STRING_UTIL_H
#define MPD_STRING_UTIL_H
#include
<glib.h>
#include
"gcc.h"
#include <stdbool.h>
...
...
@@ -28,7 +28,7 @@
* Remove the "const" attribute from a string pointer. This is a
* dirty hack, don't use it unless you know what you're doing!
*/
G_GNUC_CONST
gcc_const
static
inline
char
*
deconst_string
(
const
char
*
p
)
{
...
...
@@ -49,14 +49,14 @@ deconst_string(const char *p)
* This is a faster version of g_strchug(), because it does not move
* data.
*/
G_GNUC_PURE
gcc_pure
const
char
*
strchug_fast_c
(
const
char
*
p
);
/**
* Same as strchug_fast_c(), but works with a writable pointer.
*/
G_GNUC_PURE
gcc_pure
static
inline
char
*
strchug_fast
(
char
*
p
)
{
...
...
src/strset.c
View file @
8e331cfc
...
...
@@ -20,6 +20,8 @@
#include "config.h"
#include "strset.h"
#include <glib.h>
#include <assert.h>
#include <string.h>
#include <stdlib.h>
...
...
src/strset.h
View file @
8e331cfc
...
...
@@ -29,11 +29,13 @@
#ifndef MPD_STRSET_H
#define MPD_STRSET_H
#include
<glib.h>
#include
"gcc.h"
struct
strset
;
G_GNUC_MALLOC
struct
strset
*
strset_new
(
void
);
gcc_malloc
struct
strset
*
strset_new
(
void
);
void
strset_free
(
struct
strset
*
set
);
...
...
src/tag_id3.h
View file @
8e331cfc
...
...
@@ -21,10 +21,9 @@
#define MPD_TAG_ID3_H
#include "check.h"
#include "gcc.h"
#include "gerror.h"
#include <glib.h>
#include <stdbool.h>
struct
tag_handler
;
...
...
@@ -52,9 +51,9 @@ tag_id3_load(const char *path_fs, GError **error_r);
#else
static
inline
bool
tag_id3_scan
(
G_GNUC_UNUSED
const
char
*
path_fs
,
G_GNUC_UNUSED
const
struct
tag_handler
*
handler
,
G_GNUC_UNUSED
void
*
handler_ctx
)
tag_id3_scan
(
gcc_unused
const
char
*
path_fs
,
gcc_unused
const
struct
tag_handler
*
handler
,
gcc_unused
void
*
handler_ctx
)
{
return
false
;
}
...
...
src/update_archive.h
View file @
8e331cfc
...
...
@@ -21,6 +21,7 @@
#define MPD_UPDATE_ARCHIVE_H
#include "check.h"
#include "gcc.h"
#include <stdbool.h>
#include <sys/stat.h>
...
...
@@ -40,10 +41,10 @@ update_archive_file(struct directory *directory,
#include <glib.h>
static
inline
bool
update_archive_file
(
G_GNUC_UNUSED
struct
directory
*
directory
,
G_GNUC_UNUSED
const
char
*
name
,
G_GNUC_UNUSED
const
char
*
suffix
,
G_GNUC_UNUSED
const
struct
stat
*
st
)
update_archive_file
(
gcc_unused
struct
directory
*
directory
,
gcc_unused
const
char
*
name
,
gcc_unused
const
char
*
suffix
,
gcc_unused
const
struct
stat
*
st
)
{
return
false
;
}
...
...
src/uri.h
View file @
8e331cfc
...
...
@@ -20,7 +20,7 @@
#ifndef MPD_URI_H
#define MPD_URI_H
#include
<glib.h>
#include
"gcc.h"
#include <stdbool.h>
...
...
@@ -28,10 +28,10 @@
* Checks whether the specified URI has a scheme in the form
* "scheme://".
*/
G_GNUC_PURE
gcc_pure
bool
uri_has_scheme
(
const
char
*
uri
);
G_GNUC_PURE
gcc_pure
const
char
*
uri_get_suffix
(
const
char
*
uri
);
...
...
@@ -43,7 +43,7 @@ uri_get_suffix(const char *uri);
* - no double slashes
* - no path component begins with a dot
*/
G_GNUC_PURE
gcc_pure
bool
uri_safe_local
(
const
char
*
uri
);
...
...
@@ -53,7 +53,7 @@ uri_safe_local(const char *uri);
* NULL if nothing needs to be removed, or if the URI is not
* recognized.
*/
G_GNUC_MALLOC
gcc_malloc
char
*
uri_remove_auth
(
const
char
*
uri
);
...
...
src/util/bit_reverse.h
View file @
8e331cfc
...
...
@@ -20,12 +20,13 @@
#ifndef MPD_BIT_REVERSE_H
#define MPD_BIT_REVERSE_H
#include <glib.h>
#include "gcc.h"
#include <stdint.h>
extern
const
uint8_t
bit_reverse_table
[
256
];
G_GNUC_CONST
gcc_const
static
inline
uint8_t
bit_reverse
(
uint8_t
x
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment