use [[gnu::...]] attributes

This commit is contained in:
Max Kellermann
2023-03-06 15:57:36 +01:00
parent 3b9aab0684
commit 42f6a0441c
101 changed files with 167 additions and 234 deletions
+3 -4
View File
@@ -6,7 +6,6 @@
#include "input/Ptr.hxx"
#include "thread/Mutex.hxx"
#include "util/Compiler.h"
#include <string_view>
@@ -104,19 +103,19 @@ struct PlaylistPlugin {
/**
* Does the plugin announce the specified URI scheme?
*/
gcc_pure gcc_nonnull_all
[[gnu::pure]]
bool SupportsScheme(std::string_view scheme) const noexcept;
/**
* Does the plugin announce the specified file name suffix?
*/
gcc_pure gcc_nonnull_all
[[gnu::pure]]
bool SupportsSuffix(std::string_view suffix) const noexcept;
/**
* Does the plugin announce the specified MIME type?
*/
gcc_pure gcc_nonnull_all
[[gnu::pure]]
bool SupportsMimeType(std::string_view mime_type) const noexcept;
};
+1 -3
View File
@@ -5,7 +5,6 @@
#define MPD_PLAYLIST_STREAM_HXX
#include "thread/Mutex.hxx"
#include "util/Compiler.h"
#include <memory>
@@ -18,11 +17,10 @@ class Path;
* @param path the path of the playlist file
* @return a playlist, or nullptr on error
*/
gcc_nonnull_all
std::unique_ptr<SongEnumerator>
playlist_open_path(Path path, Mutex &mutex);
gcc_nonnull_all
[[gnu::nonnull]]
std::unique_ptr<SongEnumerator>
playlist_open_remote(const char *uri, Mutex &mutex);
+1 -2
View File
@@ -6,7 +6,6 @@
#include "song/DetachedSong.hxx"
#include "tag/Builder.hxx"
#include "util/Compiler.h"
#include <memory>
#include <string>
@@ -108,7 +107,7 @@ public:
std::unique_ptr<DetachedSong> Get() noexcept;
private:
gcc_pure
[[gnu::pure]]
TagBuilder *GetCurrentTag() noexcept;
/**