diff minijss/jss.h @ 1134:d0898867ec4c

Various fixes for issues reported by clang static analyzer.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 04 Mar 2015 08:38:19 +0200
parents 2af228303727
children 2cb0955b50f6
line wrap: on
line diff
--- a/minijss/jss.h	Wed Mar 04 07:16:06 2015 +0200
+++ b/minijss/jss.h	Wed Mar 04 08:38:19 2015 +0200
@@ -84,7 +84,7 @@
  * and debug-messages. Otherwise use a macro stub.
  */
 #ifndef JSS_LIGHT
-#  define JSSERROR(MEVAL, MRET, ...) do { jssError(MEVAL, __FILE__, (int) __LINE__, __VA_ARGS__); if (jssErrorIsFatal) return MRET; } while (0)
+#  define JSSERROR(MEVAL, MRET, ...) do { jssError(MEVAL, __FILE__, (int) __LINE__, __VA_ARGS__); return MRET; } while (0)
 #  define JSSWARNING(MEVAL, MRET, ...) do { jssWarning(MEVAL, __FILE__, (int) __LINE__, __VA_ARGS__); if (jssWarningIsFatal) return MRET; } while (0)
 #  ifdef JSS_DEBUG
 #    define JSSDEBUG(...) do { fprintf(stderr, "[%s:%d]: ", __FILE__, (int) __LINE__); fprintf(stderr, __VA_ARGS__); } while (0)
@@ -92,7 +92,7 @@
 #    define JSSDEBUG(...) do { } while (0)
 #  endif // NDEBUG
 #else
-#  define JSSERROR(MEVAL, MRET, ...) do { return MRET; } while (0)
+#  define JSSERROR(MRET, MRET, ...) return MRET
 #  define JSSWARNING(MEVAL, MRET, ...) do { } while (0)
 #  define JSSDEBUG(...) do { } while (0)
 #endif // JSS_LIGHT