[Freeciv-Dev] (PR#11283) [C++] explicit cast on void pointer
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: |
[Freeciv-Dev] (PR#11283) [C++] explicit cast on void pointer |
From: |
"Frédéric Brière" <fbriere@xxxxxxxxxxx> |
Date: |
Wed, 1 Dec 2004 02:27:07 -0800 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=11283 >
This patch adds an explicit cast to a void pointer, to conform to the
return type of the enclosing function. This occurs in two files.
--
Frédéric Brière <*> fbriere@xxxxxxxxxxx
=> <fbriere@xxxxxxxxxx> IS NO MORE: <http://www.abacomsucks.com> <=
Index: utility/speclist.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/utility/speclist.h,v
retrieving revision 1.7
diff -u -r1.7 speclist.h
--- utility/speclist.h 14 Sep 2004 21:10:44 -0000 1.7
+++ utility/speclist.h 1 Dec 2004 10:23:28 -0000
@@ -98,7 +98,7 @@
static inline SPECLIST_TYPE *SPECLIST_FOO(_list_get) (const SPECLIST_LIST
*tthis, int index)
{
- return genlist_get(&tthis->list, index);
+ return (SPECLIST_TYPE *)genlist_get(&tthis->list, index);
}
static inline void SPECLIST_FOO(_list_insert_back) (SPECLIST_LIST *tthis,
SPECLIST_TYPE *pfoo)
Index: utility/specvec.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/utility/specvec.h,v
retrieving revision 1.8
diff -u -r1.8 specvec.h
--- utility/specvec.h 25 Sep 2004 18:49:37 -0000 1.8
+++ utility/specvec.h 1 Dec 2004 10:23:28 -0000
@@ -93,7 +93,7 @@
if (size > tthis->size_alloc) {
int new_size = MAX(size, tthis->size_alloc * 2);
- tthis->p = fc_realloc(tthis->p, new_size * sizeof(*tthis->p));
+ tthis->p = (SPECVEC_TYPE *)fc_realloc(tthis->p, new_size *
sizeof(*tthis->p));
tthis->size_alloc = new_size;
}
tthis->size = size;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#11283) [C++] explicit cast on void pointer,
Frédéric Brière <=
|
|