fix waring if you #include <linux/kdb.h>

Thomas Duffy Thomas.Duffy.99 at alumni.brown.edu
Mon Apr 1 16:08:11 PST 2002


if you include kdb.h and CONFIG_KDB is not on, gcc will generate this
warning:

warning: statement with no effect

if your code calls kdb().  this patch fixes this (so you can compile
-Werror like I like to do with my code :)

-tduffy

-- 
He who receives an idea from me, receives instruction himself without
lessening mine; as he who lights his taper at mine, receives light
without darkening me.                      -- Thomas Jefferson
-------------- next part --------------
--- linux_kdb/include/linux/kdb.h.orig	Wed Feb 13 11:54:17 2002
+++ linux_kdb/include/linux/kdb.h	Mon Apr  1 15:57:07 2002
@@ -164,7 +164,7 @@
 #ifdef	CONFIG_KDB
 extern int   kdb(kdb_reason_t, int, kdb_eframe_t);
 #else
-#define kdb(reason,error_code,frame) (0)
+#define kdb(reason,error_code,frame) do { } while(0)
 #endif
 
 typedef int (*kdb_func_t)(int, const char **, const char **, kdb_eframe_t);


More information about the kdb mailing list