projects
/
idzebra-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
dc58eff
)
Added type casts (signed/unsigned char) to make GCC 4 happy
author
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 22 Aug 2005 08:18:43 +0000
(08:18 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 22 Aug 2005 08:18:43 +0000
(08:18 +0000)
index/recindex.c
patch
|
blob
|
history
diff --git
a/index/recindex.c
b/index/recindex.c
index
31d20ab
..
3991171
100644
(file)
--- a/
index/recindex.c
+++ b/
index/recindex.c
@@
-1,4
+1,4
@@
-/* $Id: recindex.c,v 1.45 2005-08-09 12:30:46 adam Exp $
+/* $Id: recindex.c,v 1.46 2005-08-22 08:18:43 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
Copyright (C) 1995-2005
Index Data ApS
@@
-434,23
+434,27
@@
static void rec_cache_flush_block1(Records p, Record rec, Record last_rec,
if (i == 0)
{
rec_encode_zint(rec_sysno_to_int(rec->sysno),
if (i == 0)
{
rec_encode_zint(rec_sysno_to_int(rec->sysno),
- *out_buf + *out_offset, &len);
+ (unsigned char *) *out_buf + *out_offset, &len);
(*out_offset) += len;
}
if (rec->size[i] == 0)
{
(*out_offset) += len;
}
if (rec->size[i] == 0)
{
- rec_encode_unsigned(1, *out_buf + *out_offset, &len);
+ rec_encode_unsigned(1, (unsigned char *) *out_buf + *out_offset,
+ &len);
(*out_offset) += len;
}
else if (last_rec && rec->size[i] == last_rec->size[i] &&
!memcmp(rec->info[i], last_rec->info[i], rec->size[i]))
{
(*out_offset) += len;
}
else if (last_rec && rec->size[i] == last_rec->size[i] &&
!memcmp(rec->info[i], last_rec->info[i], rec->size[i]))
{
- rec_encode_unsigned(0, *out_buf + *out_offset, &len);
+ rec_encode_unsigned(0, (unsigned char *) *out_buf + *out_offset,
+ &len);
(*out_offset) += len;
}
else
{
(*out_offset) += len;
}
else
{
- rec_encode_unsigned(rec->size[i]+1, *out_buf + *out_offset, &len);
+ rec_encode_unsigned(rec->size[i]+1,
+ (unsigned char *) *out_buf + *out_offset,
+ &len);
(*out_offset) += len;
memcpy(*out_buf + *out_offset, rec->info[i], rec->size[i]);
(*out_offset) += rec->size[i];
(*out_offset) += len;
memcpy(*out_buf + *out_offset, rec->info[i], rec->size[i]);
(*out_offset) += rec->size[i];
@@
-504,7
+508,7
@@
static void rec_write_multiple(Records p, int saveCount)
*sysnop = -1;
if (ref_count)
{
*sysnop = -1;
if (ref_count)
{
- int csize = 0; /* indicate compression "not performed yet" */
+ unsigned int csize = 0; /* indicate compression "not performed yet" */
compression_method = p->compression_method;
switch (compression_method)
{
compression_method = p->compression_method;
switch (compression_method)
{
@@
-656,7
+660,7
@@
static Record rec_get_int(Records p, SYSNO sysno)
char *in_buf = 0;
char *bz_buf = 0;
#if HAVE_BZLIB_H
char *in_buf = 0;
char *bz_buf = 0;
#if HAVE_BZLIB_H
- int bz_size;
+ unsigned int bz_size;
#endif
char compression_method;
#endif
char compression_method;
@@
-745,13
+749,13
@@
static Record rec_get_int(Records p, SYSNO sysno)
{
zint this_sysno;
int len;
{
zint this_sysno;
int len;
- rec_decode_zint(&this_sysno, nptr, &len);
+ rec_decode_zint(&this_sysno, (unsigned char *) nptr, &len);
nptr += len;
for (i = 0; i < REC_NO_INFO; i++)
{
nptr += len;
for (i = 0; i < REC_NO_INFO; i++)
{
- int this_size;
- rec_decode_unsigned(&this_size, nptr, &len);
+ unsigned int this_size;
+ rec_decode_unsigned(&this_size, (unsigned char *) nptr, &len);
nptr += len;
if (this_size == 0)
nptr += len;
if (this_size == 0)