freebsd-ports/databases/dbconnect/files/patch-src-base-baseValue.cpp
Sergey Matveychuk 80a2dcf003 - Fix build with gcc 4.1
Reported by:	kris mail
2007-01-28 14:47:30 +00:00

30 lines
960 B
C++

--- src/base/baseValue.cpp.orig Sun Jan 28 14:13:03 2007
+++ src/base/baseValue.cpp Sun Jan 28 14:14:42 2007
@@ -49,11 +49,11 @@
base = 10;
// Only convert the first valid chars.
- char *end = (char*)((int)nptr + strlen(nptr)-1);
+ char *end = (char*)((long)nptr + strlen(nptr)-1);
for (i=0; i<strlen(nptr); i++)
if (!isdigit(nptr[i]) && nptr[i] != '+' && nptr[i] != '-')
{
- end = (char*)((int)nptr + i -1);
+ end = (char*)((long)nptr + i -1);
break;
}
@@ -91,11 +91,11 @@
base = 10;
//Only convert the first valid chars.
- char *end = (char*)((int)nptr + strlen(nptr)-1);
+ char *end = (char*)((long)nptr + strlen(nptr)-1);
for (i=0; i<strlen(nptr); i++)
if (!isdigit(nptr[i]) && nptr[i] != '+')
{
- end = (char*)((int)nptr + i -1);
+ end = (char*)((long)nptr + i -1);
break;
}