new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git] / src / headers / debug_op.h
old mode 100755 (executable)
new mode 100644 (file)
index 52b9f18..238560d
@@ -1,6 +1,3 @@
-/* @(#) $Id: ./src/headers/debug_op.h, 2011/09/08 dcid Exp $
- */
-
 /* Copyright (C) 2009 Trend Micro Inc.
  * All right reserved.
  *
  * Foundation
  */
 
-
-/* Part of the OSSEC HIDS
- * Available at http://www.ossec.net
+/* Functions to generate debug/verbose/err reports
+ *
+ * We have two debug levels (1 and 2), a verbose mode and an error function
+ *
+ * To see these messages, use the "-d","-v" options (or "-d" twice to see debug2)
+ * The merror is printed by default when an important error occurs
  */
 
-/* Functions to generate debug/verbose/err reports.
- * Right now, we have two debug levels: 1,2,
- * a verbose mode and a error (merror) function.
- * To see these messages, use the "-d","-v" options
- * (or "-d" twice to see debug2). The merror is printed
- * by default when an important error occur.
- * */
-
 #ifndef __DEBUG_H
-
 #define __DEBUG_H
 
 #ifndef __GNUC__
 #define __attribute__(x)
 #endif
 
-void debug1(const char *msg,...) __attribute__((format(printf, 1, 2)));
-
-void debug2(const char *msg,...) __attribute__((format(printf, 1, 2)));
-
-void merror(const char *msg,...) __attribute__((format(printf, 1, 2)));
-
-void verbose(const char *msg,...) __attribute__((format(printf, 1, 2)));
-
-void print_out(const char *msg,...) __attribute__((format(printf, 1, 2)));
-
-void log2file(const char * msg,... ) __attribute__((format(printf, 1, 2)));
-
-void ErrorExit(const char *msg,...) __attribute__((format(printf, 1, 2)));
-
+void debug1(const char *msg, ...) __attribute__((format(printf, 1, 2))) __attribute__((nonnull));
+void debug2(const char *msg, ...) __attribute__((format(printf, 1, 2))) __attribute__((nonnull));
+void merror(const char *msg, ...) __attribute__((format(printf, 1, 2))) __attribute__((nonnull));
+void verbose(const char *msg, ...) __attribute__((format(printf, 1, 2))) __attribute__((nonnull));
+void print_out(const char *msg, ...) __attribute__((format(printf, 1, 2))) __attribute__((nonnull));
+void log2file(const char *msg, ... ) __attribute__((format(printf, 1, 2))) __attribute__((nonnull));
+void ErrorExit(const char *msg, ...) __attribute__((format(printf, 1, 2))) __attribute__((nonnull)) __attribute__ ((noreturn));
 
 /* Use these three functions to set when you
  * enter in debug, chroot or daemon mode
  */
-void nowDebug();
+void nowDebug(void);
+void nowChroot(void);
+void nowDaemon(void);
 
-void nowChroot();
-
-void nowDaemon();
-
-int isChroot();
+int isChroot(void);
 
 /* Debug analysisd */
 #ifdef DEBUGAD
-    #define DEBUG_MSG(x,y,z) verbose(x,y,z)
+#define DEBUG_MSG(x,y,z) verbose(x,y,z)
 #else
-    #define DEBUG_MSG(x,y,z)
+#define DEBUG_MSG(x,y,z)
 #endif /* end debug analysisd */
 
-#endif
+#endif /* __DEBUG_H */
+