[PATCH] fixes a compiler warning in smsboxc_run(void *arg)
"Vincent CHAVANIS" <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <0aa401c64e74$fd92b160$9600a8c0@vince> |
This patch fixes a compiler warning in function static void smsboxc_run(void *arg) when using 64bit system
Explanation;
void *arg return a 64bit so we cannot cast it to an int which is natively 32bits (defined by "int port;")
so we have to cast it first with a long then "downgrade" to a 32bit int.
regards
Vincent
-----
diff -ru /gateway/gw/bb_boxc.c /gateway2/gw/bb_boxc.c
--- /gateway/gw/bb_boxc.c 2005-02-11 16:35:48.000000000 +0100
+++ /gateway2/gw/bb_boxc.c 2006-03-22 11:46:03.000000000 +0100
@@ -921,10 +921,10 @@
gwlist_add_producer(flow_threads);
gwthread_wakeup(MAIN_THREAD_ID);
- port = (int)arg;
+ port = (int) (long) arg;
fd = make_server_socket(port, NULL);
/* XXX add interface_name if required */
if (fd < 0) {
panic(0, "Could not open smsbox port %d", port);
@@ -977,10 +977,10 @@
gwlist_add_producer(flow_threads);
gwthread_wakeup(MAIN_THREAD_ID);
- port = (int)arg;
+ port = (int) (long) arg;
fd = make_server_socket(port, NULL);
/* XXX add interface_name if required */
--
Telemaque - NICE - (FR)
Service Technique - Developpement
http://www.telemaque.fr/
[email protected]
Tel : +33 4 93 97 71 64 (fax 68)
patch_warning_smsbox.txt
(text/plain, 765 B)
diff -ru /gateway/gw/bb_boxc.c /gateway2/gw/bb_boxc.c
--- /gateway/gw/bb_boxc.c 2005-02-11 16:35:48.000000000 +0100
+++ /gateway2/gw/bb_boxc.c 2006-03-22 11:46:03.000000000 +0100
@@ -921,10 +921,10 @@
gwlist_add_producer(flow_threads);
gwthread_wakeup(MAIN_THREAD_ID);
- port = (int)arg;
+ port = (int) (long) arg;
fd = make_server_socket(port, NULL);
/* XXX add interface_name if required */
if (fd < 0) {
panic(0, "Could not open smsbox port %d", port);
@@ -977,10 +977,10 @@
gwlist_add_producer(flow_threads);
gwthread_wakeup(MAIN_THREAD_ID);
- port = (int)arg;
+ port = (int) (long) arg;
fd = make_server_socket(port, NULL);
/* XXX add interface_name if required */