File: 1010-netmodel_cc_void_int.patch

package info (click to toggle)
nam 1.15-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 29,532 kB
  • sloc: cpp: 17,346; tcl: 10,655; sh: 2,997; ansic: 1,253; makefile: 139; perl: 66
file content (27 lines) | stat: -rw-r--r-- 819 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Description: Cast pointers to correct type.
Author: YunQiang Su <wzssyqa@gmail.com>
Forwarded: no
Last-Update: 2011-11-27
---
Index: nam/netmodel.cc
===================================================================
--- nam.orig/netmodel.cc	2011-11-24 22:01:28.778528404 +0800
+++ nam/netmodel.cc	2011-11-24 22:02:05.954712753 +0800
@@ -308,7 +308,7 @@
 	Tcl_HashEntry *he = Tcl_FindHashEntry(addrHash_, (const char *)addr);
 	if (he == NULL)
 		return -1;
-	return *Tcl_GetHashValue(he);
+	return *(int *)Tcl_GetHashValue(he);
 }
 
 //----------------------------------------------------------------------
@@ -2761,7 +2761,7 @@
 	Tcl_HashEntry *he = Tcl_FindHashEntry(objnameHash_, n);
 	if (he == NULL)
 		return -1;
-	return *Tcl_GetHashValue(he);
+	return *(int *)Tcl_GetHashValue(he);
 #undef STATIC_NAMELEN
 }