projects
/
gcc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cplus_demangle_fill_component: Handle DEMANGLE_COMPONENT_RVALUE_REFERENCE
[gcc.git]
/
libiberty
/
regex.c
diff --git
a/libiberty/regex.c
b/libiberty/regex.c
index 17091ce9569fdc991efb5f5c939bd56ac089ecf6..66d09d935a2f83f673311ec0c5eb9437a5ce1458 100644
(file)
--- a/
libiberty/regex.c
+++ b/
libiberty/regex.c
@@
-3,8
+3,7
@@
(Implements POSIX draft P1003.2/D11.2, except for some of the
internationalization features.)
(Implements POSIX draft P1003.2/D11.2, except for some of the
internationalization features.)
- Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2005, 2010, 2013 Free Software Foundation, Inc.
+ Copyright (C) 1993-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@
-151,7
+150,7
@@
char *realloc ();
# include <string.h>
# ifndef bzero
# ifndef _LIBC
# include <string.h>
# ifndef bzero
# ifndef _LIBC
-# define bzero(s, n) (
memset (s, '\0', n), (s
))
+# define bzero(s, n) (
(void) memset (s, '\0', n
))
# else
# define bzero(s, n) __bzero (s, n)
# endif
# else
# define bzero(s, n) __bzero (s, n)
# endif
@@
-685,7
+684,7
@@
typedef enum
# define EXTRACT_NUMBER(destination, source) \
do { \
(destination) = *(source) & 0377; \
# define EXTRACT_NUMBER(destination, source) \
do { \
(destination) = *(source) & 0377; \
- (destination) +=
SIGN_EXTEND_CHAR (*((source) + 1)) << 8;
\
+ (destination) +=
((unsigned) SIGN_EXTEND_CHAR (*((source) + 1))) << 8;
\
} while (0)
# endif
} while (0)
# endif
@@
-2493,6
+2492,7
@@
PREFIX(regex_compile) (const char *ARG_PREFIX(pattern),
if ((syntax & RE_BK_PLUS_QM)
|| (syntax & RE_LIMITED_OPS))
goto normal_char;
if ((syntax & RE_BK_PLUS_QM)
|| (syntax & RE_LIMITED_OPS))
goto normal_char;
+ /* Fall through. */
handle_plus:
case '*':
/* If there is no previous pattern... */
handle_plus:
case '*':
/* If there is no previous pattern... */
@@
-3396,7
+3396,7
@@
PREFIX(regex_compile) (const char *ARG_PREFIX(pattern),
class. */
PATFETCH (c);
class. */
PATFETCH (c);
- /* Now we have to go through
t
the whole table
+ /* Now we have to go through the whole table
and find all characters which have the same
first level weight.
and find all characters which have the same
first level weight.
@@
-6697,6
+6697,7
@@
byte_re_match_2_internal (struct re_pattern_buffer *bufp,
{
case jump_n:
is_a_jump_n = true;
{
case jump_n:
is_a_jump_n = true;
+ /* Fall through. */
case pop_failure_jump:
case maybe_pop_jump:
case jump:
case pop_failure_jump:
case maybe_pop_jump:
case jump:
@@
-7125,7
+7126,7
@@
byte_re_match_2_internal (struct re_pattern_buffer *bufp,
DEBUG_PRINT1 (" Match => jump.\n");
goto unconditional_jump;
}
DEBUG_PRINT1 (" Match => jump.\n");
goto unconditional_jump;
}
- /*
Note f
all through. */
+ /*
F
all through. */
/* The end of a simple repeat has a pop_failure_jump back to
/* The end of a simple repeat has a pop_failure_jump back to
@@
-7150,7
+7151,7
@@
byte_re_match_2_internal (struct re_pattern_buffer *bufp,
dummy_low_reg, dummy_high_reg,
reg_dummy, reg_dummy, reg_info_dummy);
}
dummy_low_reg, dummy_high_reg,
reg_dummy, reg_dummy, reg_info_dummy);
}
- /*
Note f
all through. */
+ /*
F
all through. */
unconditional_jump:
#ifdef _LIBC
unconditional_jump:
#ifdef _LIBC
@@
-7453,6
+7454,7
@@
byte_re_match_2_internal (struct re_pattern_buffer *bufp,
{
case jump_n:
is_a_jump_n = true;
{
case jump_n:
is_a_jump_n = true;
+ /* Fall through. */
case maybe_pop_jump:
case pop_failure_jump:
case jump:
case maybe_pop_jump:
case pop_failure_jump:
case jump:
@@
-7718,6
+7720,7
@@
PREFIX(common_op_match_null_string_p) (UCHAR_T **p, UCHAR_T *end,
case set_number_at:
p1 += 2 * OFFSET_ADDRESS_SIZE;
case set_number_at:
p1 += 2 * OFFSET_ADDRESS_SIZE;
+ return false;
default:
/* All other opcodes mean we cannot match the empty string. */
default:
/* All other opcodes mean we cannot match the empty string. */
@@
-8093,12
+8096,12
@@
regerror (int errcode, const regex_t *preg ATTRIBUTE_UNUSED,
#if defined HAVE_MEMPCPY || defined _LIBC
*((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
#else
#if defined HAVE_MEMPCPY || defined _LIBC
*((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
#else
- memcpy (errbuf, msg, errbuf_size - 1);
+
(void)
memcpy (errbuf, msg, errbuf_size - 1);
errbuf[errbuf_size - 1] = 0;
#endif
}
else
errbuf[errbuf_size - 1] = 0;
#endif
}
else
- memcpy (errbuf, msg, msg_size);
+
(void)
memcpy (errbuf, msg, msg_size);
}
return msg_size;
}
return msg_size;