projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1e77562
)
Cast the malloc/realloc results. Needed when CC=g++.
author
Bruno Haible
<bruno@clisp.org>
Tue, 15 Mar 2005 12:04:08 +0000
(12:04 +0000)
committer
Bruno Haible
<bruno@clisp.org>
Tue, 15 Mar 2005 12:04:08 +0000
(12:04 +0000)
lib/ChangeLog
patch
|
blob
|
history
lib/regex.c
patch
|
blob
|
history
diff --git
a/lib/ChangeLog
b/lib/ChangeLog
index 9b9681e4219a3a1fc4a6450676b5e1631cd19093..5d07911fa27cab3dfcef7a8f5bc99b8ddb0d06e4 100644
(file)
--- a/
lib/ChangeLog
+++ b/
lib/ChangeLog
@@
-6,6
+6,8
@@
* regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
variable.
* regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
variable.
+ * regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc results.
+
2005-03-14 Paul Eggert <eggert@cs.ucla.edu>
* mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
2005-03-14 Paul Eggert <eggert@cs.ucla.edu>
* mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
diff --git
a/lib/regex.c
b/lib/regex.c
index c5176ea6f27c4bf247e828e0910ac9d6c4e2ddef..51106c05109b4519fb43c4aa064ab02c143d98b9 100644
(file)
--- a/
lib/regex.c
+++ b/
lib/regex.c
@@
-4,7
+4,7
@@
internationalization features.)
Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
internationalization features.)
Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004 Free Software Foundation, Inc.
+ 2002, 2003, 2004
, 2005
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-2079,7
+2079,8
@@
static reg_errcode_t byte_compile_range (unsigned int range_start,
bufp->allocated <<= 1; \
if (bufp->allocated > MAX_BUF_SIZE) \
bufp->allocated = MAX_BUF_SIZE; \
bufp->allocated <<= 1; \
if (bufp->allocated > MAX_BUF_SIZE) \
bufp->allocated = MAX_BUF_SIZE; \
- bufp->buffer = REALLOC (COMPILED_BUFFER_VAR, bufp->allocated); \
+ bufp->buffer \
+ = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR, bufp->allocated); \
if (COMPILED_BUFFER_VAR == NULL) \
return REG_ESPACE; \
/* If the buffer moved, move all the pointers into it. */ \
if (COMPILED_BUFFER_VAR == NULL) \
return REG_ESPACE; \
/* If the buffer moved, move all the pointers into it. */ \
@@
-8017,14
+8018,15
@@
regcomp (regex_t *preg, const char *pattern, int cflags)
preg->used = 0;
/* Try to allocate space for the fastmap. */
preg->used = 0;
/* Try to allocate space for the fastmap. */
- preg->fastmap = malloc (1 << BYTEWIDTH);
+ preg->fastmap =
(char *)
malloc (1 << BYTEWIDTH);
if (cflags & REG_ICASE)
{
unsigned i;
if (cflags & REG_ICASE)
{
unsigned i;
- preg->translate = malloc (CHAR_SET_SIZE
- * sizeof (*(RE_TRANSLATE_TYPE)0));
+ preg->translate =
+ (RE_TRANSLATE_TYPE)
+ malloc (CHAR_SET_SIZE * sizeof (*(RE_TRANSLATE_TYPE)0));
if (preg->translate == NULL)
return (int) REG_ESPACE;
if (preg->translate == NULL)
return (int) REG_ESPACE;