[tracker-miners] tracker-extract: Turn a runtime warning into a compile-time failure
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners] tracker-extract: Turn a runtime warning into a compile-time failure
- Date: Sun, 13 Aug 2017 19:55:22 +0000 (UTC)
commit 7a02f598f7121d6a9b302c1d1945b5f663ac2158
Author: Philip Withnall <withnall endlessm com>
Date: Sat Aug 12 22:11:17 2017 +0100
tracker-extract: Turn a runtime warning into a compile-time failure
If we can’t work out the host byte order at compile time, all this code
is doomed to failure anyway. Might as well explode at compilation time
rather than runtime.
Signed-off-by: Philip Withnall <withnall endlessm com>
https://bugzilla.gnome.org/show_bug.cgi?id=786213
src/tracker-extract/tracker-extract-mp3.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-mp3.c b/src/tracker-extract/tracker-extract-mp3.c
index 3cd0856..999a6cf 100644
--- a/src/tracker-extract/tracker-extract-mp3.c
+++ b/src/tracker-extract/tracker-extract-mp3.c
@@ -473,7 +473,7 @@ extract_uint32_7bit (gconstpointer data)
((ptr[2] & 0x7F) << 14) |
((ptr[3] & 0x7F) << 21));
#else
- g_warning ("Can't figure endianness");
+ #error "Can’t figure endianness"
return 0;
#endif
}
@@ -492,7 +492,7 @@ extract_uint32_3byte (gconstpointer data)
(ptr[1] << 8) |
(ptr[2] << 16));
#else
- g_warning ("Can't figure endianness");
+ #error "Can’t figure endianness"
return 0;
#endif
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]