Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/makemandb Casting variable of type int * to size_t...
details: https://anonhg.NetBSD.org/src/rev/5f6f87a0cba9
branches: trunk
changeset: 357202:5f6f87a0cba9
user: abhinav <abhinav%NetBSD.org@localhost>
date: Tue Oct 31 10:14:27 2017 +0000
description:
Casting variable of type int * to size_t *, may cause
alignment issues on some platforms (e.g. Sparc64)
So, Use a temporary variable to avoid the cast.
Thanks to Martin@ for noticing the issue and also suggesting the issue.
Fixes PR bin/52678
diffstat:
usr.sbin/makemandb/custom_apropos_tokenizer.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (21 lines):
diff -r 58a9df44b96a -r 5f6f87a0cba9 usr.sbin/makemandb/custom_apropos_tokenizer.c
--- a/usr.sbin/makemandb/custom_apropos_tokenizer.c Tue Oct 31 08:10:11 2017 +0000
+++ b/usr.sbin/makemandb/custom_apropos_tokenizer.c Tue Oct 31 10:14:27 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: custom_apropos_tokenizer.c,v 1.1 2017/06/18 16:24:10 abhinav Exp $ */
+/* $NetBSD: custom_apropos_tokenizer.c,v 1.2 2017/10/31 10:14:27 abhinav Exp $ */
/*
** 2006 September 30
**
@@ -716,7 +716,10 @@
return SQLITE_NOMEM;
c->zToken = pNew;
}
- int stemStatus = do_stem(&z[iStartOffset], n, c->zToken, (size_t *) pnBytes);
+
+ size_t temp;
+ int stemStatus = do_stem(&z[iStartOffset], n, c->zToken, &temp);
+ *pnBytes = temp;
if (stemStatus != SQLITE_OK)
return stemStatus;
Home |
Main Index |
Thread Index |
Old Index