Hi,

smatch/sparse does not like if we have a forward declaration with () but the
implementation is using params. The patch is trying to fix it.

holger
>From 1b82566d39564f8f7621c834317c8db4f6ff383d Mon Sep 17 00:00:00 2001
From: Holger Hans Peter Freyther <[email protected]>
Date: Fri, 5 Aug 2011 16:04:27 +0200
Subject: [PATCH 1/3] smatch: Add parameters to forward declarations

2011-08-05  Holger Freyther  <[email protected]>

	* libgst/byte.h: Make smatch happy and add
	parameters to the function.
	* libgst/interp.inl: Likewise.
---
 libgst/ChangeLog  |    6 ++++++
 libgst/byte.h     |    2 +-
 libgst/interp.inl |    2 +-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/libgst/ChangeLog b/libgst/ChangeLog
index 5366141..2ab578d 100644
--- a/libgst/ChangeLog
+++ b/libgst/ChangeLog
@@ -1,3 +1,9 @@
+2011-08-05  Holger Freyther  <[email protected]>
+
+	* libgst/byte.h: Make smatch happy and add
+	parameters to the function.
+	* libgst/interp.inl: Likewise.
+
 2011-07-27  Gwenael Casaccio  <[email protected]>
             Paolo Bonzini  <[email protected]>
 
diff --git a/libgst/byte.h b/libgst/byte.h
index 6bb3c4e..08e8bcb 100644
--- a/libgst/byte.h
+++ b/libgst/byte.h
@@ -199,7 +199,7 @@ extern bc_vector _gst_save_bytecode_array ()
    BYTECODES, which should have been returned at some previous point
    from _gst_save_bytecode_array().  Return the TAG that was passed
    to _gst_save_bytecode_array.  */
-extern void _gst_restore_bytecode_array () 
+extern void _gst_restore_bytecode_array (bc_vector)
   ATTRIBUTE_HIDDEN;
 
 /* This copies the byte instance variables out of the Smalltalk
diff --git a/libgst/interp.inl b/libgst/interp.inl
index 2d30cff..96227ae 100644
--- a/libgst/interp.inl
+++ b/libgst/interp.inl
@@ -62,7 +62,7 @@ static inline OOP mul_with_check (OOP op1, OOP op2,
 
 /* Generate random number using the Mersenne Twister technique */
 static inline uint32_t random_next ();
-static inline void random_generate ();
+static inline void random_generate (uint32_t *);
 
 /* These do not need overflow checking.  */
 static inline OOP tagged_and (OOP op1, OOP op2);
-- 
1.7.4.1

_______________________________________________
help-smalltalk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to