summaryrefslogtreecommitdiff
path: root/tools_common.h
diff options
context:
space:
mode:
authorJim Bankoski <jimbankoski@google.com>2014-08-21 11:43:36 -0700
committerJim Bankoski <jimbankoski@google.com>2014-08-21 11:43:36 -0700
commite9b878ceff38c7701e132adec47eeb57aa4cf2ac (patch)
treed72d32f1feb96369e3438ed386d54a82d2d0123b /tools_common.h
parentb29d517344d2bee03fd061e54ce7376a2a7cf9d3 (diff)
downloadlibvpx-e9b878ceff38c7701e132adec47eeb57aa4cf2ac.tar
libvpx-e9b878ceff38c7701e132adec47eeb57aa4cf2ac.tar.gz
libvpx-e9b878ceff38c7701e132adec47eeb57aa4cf2ac.tar.bz2
libvpx-e9b878ceff38c7701e132adec47eeb57aa4cf2ac.zip
warnings.c : fixes dereference to null warning
Change-Id: I03cceb4b92b7362e90f3ea61342341246b9a11ab
Diffstat (limited to 'tools_common.h')
-rw-r--r--tools_common.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/tools_common.h b/tools_common.h
index 558413ea4..c1f466b01 100644
--- a/tools_common.h
+++ b/tools_common.h
@@ -103,17 +103,25 @@ struct VpxInputContext {
extern "C" {
#endif
+#if defined(__GNUC__)
+#define VPX_NO_RETURN __attribute__((noreturn))
+#else
+#define VPX_NO_RETURN
+#endif
+
/* Sets a stdio stream into binary mode */
FILE *set_binary_mode(FILE *stream);
-void die(const char *fmt, ...);
-void fatal(const char *fmt, ...);
+void die(const char *fmt, ...) VPX_NO_RETURN;
+void fatal(const char *fmt, ...) VPX_NO_RETURN;
void warn(const char *fmt, ...);
-void die_codec(vpx_codec_ctx_t *ctx, const char *s);
+void die_codec(vpx_codec_ctx_t *ctx, const char *s) VPX_NO_RETURN;
/* The tool including this file must define usage_exit() */
-void usage_exit();
+void usage_exit() VPX_NO_RETURN;
+
+#undef VPX_NO_RETURN
int read_yuv_frame(struct VpxInputContext *input_ctx, vpx_image_t *yuv_frame);