RE: [PATCH] simple patch to make gcc 3.1 not complain so much.
"Oded Arbel" <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Ahmm.. oops ? :-) -- Oded Arbel m-Wise Inc. [email protected] (972)-67-340014 (972)-9-9581711 (ext: 116) ::.. APOLOGIZE, v.i. To lay the foundation for a future offence. -- the Devil's Dictionary / Ambrose Bierce > -----Original Message----- > From: Stipe Tolj [mailto:[email protected]] > Sent: Wednesday, June 05, 2002 2:10 AM > To: Oded Arbel > Cc: Kannel-devel (E-mail) > Subject: Re: [PATCH] simple patch to make gcc 3.1 not > complain so much. > > > Oded Arbel wrote: > > > > Hi list. > > > > When compiling under gcc 3.1, the compiler complain about > discarding qulifiers when passing __func__ to > mutex_un/lock_real and unlock_out/in_real - apparently under > gcc 3.1, __func__ is declared as const char* (why not under > 2.96 too?). simply changing the decleration of the relevant > functions (which don't modify *func anyway) made gcc happy. > > > > can we get 1.2.0 out and only then apply this patch, please ? > > hmm, what patch, none attached ;) > > Stipe > > [email protected] > ------------------------------------------------------------------- > Wapme Systems AG > > Münsterstr. 248 > 40470 Düsseldorf > > Tel: +49-211-74845-0 > Fax: +49-211-74845-299 > > E-Mail: [email protected] > Internet: http://www.wapme-systems.de > ------------------------------------------------------------------- > wapme.net - wherever you are >
thread.patch
(application/octet-stream, 2.1 KB)
--- kannel-dev/gateway/gwlib/thread.h 2002-01-29 02:14:42.000000000 +0200
+++ gateway/gwlib/thread.h 2002-06-04 17:59:14.000000000 +0300
@@ -73,13 +73,13 @@
/* lock given mutex. PANIC if fails (non-initialized mutex or other
* coding error) */
#define mutex_lock(m) mutex_lock_real(m, __FILE__, __LINE__, __func__)
-void mutex_lock_real(Mutex *mutex, char *file, int line, char *func);
+void mutex_lock_real(Mutex *mutex, char *file, int line, const char *func);
/* unlock given mutex, PANIC if fails (so do not call for non-locked) */
/* returns 0 if ok 1 if failure for debugging */
#define mutex_unlock(m) mutex_unlock_real(m, __FILE__, __LINE__, __func__)
-int mutex_unlock_real(Mutex *mutex, char *file, int line, char *func);
+int mutex_unlock_real(Mutex *mutex, char *file, int line, const char *func);
#endif
--- kannel-dev/gateway/gwlib/thread.c 2002-01-29 02:30:06.000000000 +0200
+++ gateway/gwlib/thread.c 2002-06-04 18:02:11.000000000 +0300
@@ -58,7 +58,7 @@
}
-void mutex_lock_real(Mutex *mutex, char *file, int line, char *func)
+void mutex_lock_real(Mutex *mutex, char *file, int line, const char *func)
{
int ret;
@@ -83,7 +83,7 @@
mutex->owner = gwthread_self();
}
-int mutex_unlock_real(Mutex *mutex, char *file, int line, char *func)
+int mutex_unlock_real(Mutex *mutex, char *file, int line, const char *func)
{
int ret;
--- kannel-dev/gateway/gwlib/conn.c 2002-05-22 11:40:16.000000000 +0300
+++ gateway/gwlib/conn.c 2002-06-04 18:04:04.000000000 +0300
@@ -121,7 +121,7 @@
}
/* Unlock a Connection's read direction, if the Connection is unclaimed */
-static void unlock_in_real(Connection *conn, char *file, int line, char *func)
+static void unlock_in_real(Connection *conn, char *file, int line, const char *func)
{
int ret;
gw_assert(conn != NULL);
@@ -148,7 +148,7 @@
}
/* Unlock a Connection's write direction, if the Connection is unclaimed */
-static void unlock_out_real(Connection *conn, char *file, int line, char *func)
+static void unlock_out_real(Connection *conn, char *file, int line, const char *func)
{
int ret;
gw_assert(conn != NULL);