From 4fc9a7cb3d77cc0bf50e9fa3736ae6f6630d2703 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Wed, 18 Feb 2009 18:17:54 +0000 Subject: [PATCH] pull up r21886 from trunk ------------------------------------------------------------------------ r21886 | raeburn | 2009-02-04 18:28:09 -0500 (Wed, 04 Feb 2009) | 5 lines Changed paths: M /trunk/src/aclocal.m4 M /trunk/src/lib/gssapi/generic/oid_ops.c 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. ------------------------------------------------------------------------ ticket: 6362 version_fixed: 1.7 status: resolved git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-7@22016 dc483132-0cff-0310-8789-dd5450dbe970 --- src/aclocal.m4 | 2 +- src/lib/gssapi/generic/oid_ops.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/aclocal.m4 b/src/aclocal.m4 index b1141e86c..c494750ad 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -664,7 +664,7 @@ else # 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 diff --git a/src/lib/gssapi/generic/oid_ops.c b/src/lib/gssapi/generic/oid_ops.c index bd78e262b..8390e7ba0 100644 --- a/src/lib/gssapi/generic/oid_ops.c +++ b/src/lib/gssapi/generic/oid_ops.c @@ -440,7 +440,7 @@ generic_gss_oid_compose( 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 @@ generic_gss_oid_decompose( return GSS_S_BAD_MECH; } - op = oid->elements + prefix_len; + op = (unsigned char *) oid->elements + prefix_len; *suffix = 0; -- 2.26.2