Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2003:
[Freeciv-Dev] (PR#6868) Use splint out of the box
Home

[Freeciv-Dev] (PR#6868) Use splint out of the box

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#6868) Use splint out of the box
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Sat, 15 Nov 2003 05:45:14 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=6868 >


Splint doesn't know variadic macros. It also doesn't cope with the
bool type in stdbool.h.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "From what I am reading Win98 and NT5.0 will be getting rid of all that
  crap anyway. Seems that Microsoft has invented something called TCP/IP and
  another really revolutionary concept called DNS that eliminates the
  netbios crap too. All that arping from browsers is going to go away.
  I also hear rumors that they are on the verge of breakthrough discoveries
  called NFS, and LPD too. Given enough time and money, they might
  eventually invent Unix."
    -- George Bonser in linux-kernel

Index: common/log.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/log.h,v
retrieving revision 1.21
diff -u -u -r1.21 log.h
--- common/log.h        2003/10/01 20:48:44     1.21
+++ common/log.h        2003/11/15 13:39:08
@@ -87,6 +87,9 @@
 #define logdebug_suppress_warning
 #endif
 
+#ifdef S_SPLINT_S
+void freelog(int level, const char *message, ...);
+#else
 #ifdef DEBUG
 #  define freelog(level, ...)                                             \
   do {                                                                      \
@@ -102,5 +105,6 @@
     }                                                                       \
   } while(FALSE) 
 #endif  /* DEBUG */
+#endif  /* S_SPLINT_S */
 
 #endif  /* FC__LOG_H */
Index: common/shared.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/shared.h,v
retrieving revision 1.119
diff -u -u -r1.119 shared.h
--- common/shared.h     2003/10/16 00:04:56     1.119
+++ common/shared.h     2003/11/15 13:39:09
@@ -20,7 +20,7 @@
 #include <posix/be_prim.h>
 #define __bool_true_false_are_defined 1
 #else
-#ifdef HAVE_STDBOOL_H
+#if defined(HAVE_STDBOOL_H) && !defined(S_SPLINT_S)
 #include <stdbool.h>
 #else /* Implement <stdbool.h> ourselves */
 #undef bool
@@ -181,7 +181,12 @@
 int cat_snprintf(char *str, size_t n, const char *format, ...)
      fc__attribute((format (printf, 3, 4)));
 
+#ifdef S_SPLINT_S
+void die(const char *format, ...);
+#else
 #define die(...) real_die(__FILE__, __LINE__, __VA_ARGS__)
+#endif
+
 void real_die(const char *file, int line, const char *format, ...)
       fc__attribute((format (printf, 3, 4)));
 

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#6868) Use splint out of the box, Raimar Falke <=