summaryrefslogtreecommitdiff
path: root/src/sticker
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-05-08 14:48:58 +0200
committerMax Kellermann <max@musicpd.org>2017-05-08 17:25:06 +0200
commit788e3b31e1ab8243386339eaf136ede18f015d55 (patch)
tree3f9c7e44c1e522be9e1e64ed918c15b1b8101466 /src/sticker
parent71f0ed8b7499011b53f90998ebfbd3250fd80948 (diff)
*: remove "pure" and "const" attributes from throwing functions
The "pure" and "const" attributes are not so well-defined, and a recent clang version implements an optimization which pushes the definition's boundary beyond what I believed it was. clang now assumes that functions declared "pure" cannot throw exceptions, even if they lack the "noexcept" specification. When compiled with this new clang version, MPD will crash randomly if an exception happens to get thrown by such as "pure" function (https://github.com/MusicPlayerDaemon/MPD/issues/41). This commit removes all such misplaced "pure" and "const" attributes, closing #41.
Diffstat (limited to 'src/sticker')
-rw-r--r--src/sticker/SongSticker.hxx2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/sticker/SongSticker.hxx b/src/sticker/SongSticker.hxx
index f52175e97..ea78d4e47 100644
--- a/src/sticker/SongSticker.hxx
+++ b/src/sticker/SongSticker.hxx
@@ -21,7 +21,6 @@
#define MPD_SONG_STICKER_HXX
#include "Match.hxx"
-#include "Compiler.h"
#include <string>
@@ -34,7 +33,6 @@ class Database;
*
* Throws #SqliteError on error.
*/
-gcc_pure
std::string
sticker_song_get_value(const LightSong &song, const char *name);