You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2011/05/02 02:33:35 UTC
[lucy-commits] svn commit: r1098451 - in /incubator/lucy/trunk:
core/Lucy/Store/FSFileHandle.c core/Lucy/Store/InStream.c
perl/xs/Lucy/Analysis/RegexTokenizer.c
Author: marvin
Date: Mon May 2 00:33:35 2011
New Revision: 1098451
URL: http://svn.apache.org/viewvc?rev=1098451&view=rev
Log:
LUCY-141 compromises.diff
Adapt C code by adding useless parentheses in order to thwart AStyle from
padding inappropriately when presented with a cast where the '*' character is
involved.
Modified:
incubator/lucy/trunk/core/Lucy/Store/FSFileHandle.c
incubator/lucy/trunk/core/Lucy/Store/InStream.c
incubator/lucy/trunk/perl/xs/Lucy/Analysis/RegexTokenizer.c
Modified: incubator/lucy/trunk/core/Lucy/Store/FSFileHandle.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/core/Lucy/Store/FSFileHandle.c?rev=1098451&r1=1098450&r2=1098451&view=diff
==============================================================================
--- incubator/lucy/trunk/core/Lucy/Store/FSFileHandle.c (original)
+++ incubator/lucy/trunk/core/Lucy/Store/FSFileHandle.c Mon May 2 00:33:35 2011
@@ -365,7 +365,7 @@ SI_map(FSFileHandle *self, int64_t offse
if (len) {
// Read-only memory mapping.
buf = mmap(NULL, len, PROT_READ, MAP_SHARED, self->fd, offset);
- if (buf == (void*)-1) {
+ if (buf == (void*)(-1)) {
Err_set_error(Err_new(CB_newf("mmap of offset %i64 and length %i64 (page size %i64) "
"against '%o' failed: %s",
offset, len, self->page_size,
Modified: incubator/lucy/trunk/core/Lucy/Store/InStream.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/core/Lucy/Store/InStream.c?rev=1098451&r1=1098450&r2=1098451&view=diff
==============================================================================
--- incubator/lucy/trunk/core/Lucy/Store/InStream.c (original)
+++ incubator/lucy/trunk/core/Lucy/Store/InStream.c Mon May 2 00:33:35 2011
@@ -363,7 +363,7 @@ InStream_read_i8(InStream *self) {
static INLINE uint8_t
SI_read_u8(InStream *self) {
if (self->buf >= self->limit) { S_refill(self); }
- return (uint8_t)*self->buf++;
+ return (uint8_t)(*self->buf++);
}
uint8_t
Modified: incubator/lucy/trunk/perl/xs/Lucy/Analysis/RegexTokenizer.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/xs/Lucy/Analysis/RegexTokenizer.c?rev=1098451&r1=1098450&r2=1098451&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/xs/Lucy/Analysis/RegexTokenizer.c (original)
+++ incubator/lucy/trunk/perl/xs/Lucy/Analysis/RegexTokenizer.c Mon May 2 00:33:35 2011
@@ -150,14 +150,14 @@ lucy_RegexTokenizer_tokenize_str(lucy_Re
// Get start and end offsets in Unicode code points.
for (; string_arg < start_ptr; num_code_points++) {
- string_arg += lucy_StrHelp_UTF8_COUNT[(uint8_t)*string_arg];
+ string_arg += lucy_StrHelp_UTF8_COUNT[(uint8_t)(*string_arg)];
if (string_arg > string_end) {
THROW(LUCY_ERR, "scanned past end of '%s'", string_beg);
}
}
start = num_code_points;
for (; string_arg < end_ptr; num_code_points++) {
- string_arg += lucy_StrHelp_UTF8_COUNT[(uint8_t)*string_arg];
+ string_arg += lucy_StrHelp_UTF8_COUNT[(uint8_t)(*string_arg)];
if (string_arg > string_end) {
THROW(LUCY_ERR, "scanned past end of '%s'", string_beg);
}