svn rev #21886: trunk/src/ lib/gssapi/generic/
raeburn@MIT.EDU
raeburn at MIT.EDU
Wed Feb 4 18:28:13 EST 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=21886
Commit By: raeburn
Log Message:
ticket: 6362
subject: don't do arithmetic on void pointers
Fix one file in gssapi where we compute offsets from a void* without casting.
Change options used with Sun compiler to make such expressions an error.
Changed Files:
U trunk/src/aclocal.m4
U trunk/src/lib/gssapi/generic/oid_ops.c
Modified: trunk/src/aclocal.m4
===================================================================
--- trunk/src/aclocal.m4 2009-02-04 23:06:12 UTC (rev 21885)
+++ trunk/src/aclocal.m4 2009-02-04 23:28:09 UTC (rev 21886)
@@ -664,7 +664,7 @@
# works, but it also means that declaration-in-code warnings won't
# be issued.
# -v -fd -errwarn=E_DECLARATION_IN_CODE ...
- WARN_CFLAGS="-errtags=yes -errwarn=E_BAD_PTR_INT_COMBINATION"
+ WARN_CFLAGS="-errtags=yes -errwarn=E_BAD_PTR_INT_COMBINATION -errwarn=E_PTR_TO_VOID_IN_ARITHMETIC"
WARN_CXXFLAGS="-errtags=yes +w +w2 -xport64"
fi
fi
Modified: trunk/src/lib/gssapi/generic/oid_ops.c
===================================================================
--- trunk/src/lib/gssapi/generic/oid_ops.c 2009-02-04 23:06:12 UTC (rev 21885)
+++ trunk/src/lib/gssapi/generic/oid_ops.c 2009-02-04 23:28:09 UTC (rev 21886)
@@ -440,7 +440,7 @@
return GSS_S_FAILURE;
}
- op = oid->elements + prefix_len + nbytes;
+ op = (unsigned char *) oid->elements + prefix_len + nbytes;
i = -1;
while (suffix) {
op[i] = (unsigned char)suffix & 0x7f;
@@ -472,7 +472,7 @@
return GSS_S_BAD_MECH;
}
- op = oid->elements + prefix_len;
+ op = (unsigned char *) oid->elements + prefix_len;
*suffix = 0;
More information about the cvs-krb5
mailing list