Article View: gnu.g++.lib.bug
Article #123compiler warnings in src/regex.c
From: Andrew Klossner
Date: Fri, 11 Aug 1989 22:44
Date: Fri, 11 Aug 1989 22:44
50 lines
2044 bytes
2044 bytes
Compiling src/regex.c on a Tektronix 88k workstation results in these
warnings:
regex.c: In function re_search_2:
regex.c:1069: warning: argument passing between incompatible pointer types
regex.c:1069: warning: argument passing between incompatible pointer types
regex.c: In function re_match:
regex.c:1096: warning: argument passing between incompatible pointer types
The problem is that arguments of type (char *) are being passed to
parameters of type (unsigned char *). A brute force fix is enclosed.
-=- Andrew Klossner (uunet!tektronix!frip.WV.TEK!andrew) [UUCP]
(andrew%frip.wv.tek.com@relay.cs.net) [ARPA]
*** ORIG-libg++-1.35.1/src/regex.c Thu Mar 30 02:59:54 1989
--- libg++-88k/src/regex.c Fri Aug 11 15:41:20 1989
***************
*** 1066,1072 ****
&& fastmap && pbufp->can_be_null == 0)
return -1;
! val = re_match_2 (pbufp, string1, size1, string2, size2, startpos, regs, mstop);
if (0 <= val)
{
if (val == -2)
--- 1066,1072 ----
&& fastmap && pbufp->can_be_null == 0)
return -1;
! val = re_match_2 (pbufp, (unsigned char *)string1, size1, (unsigned char *)string2, size2, startpos, regs, mstop);
if (0 <= val)
{
if (val == -2)
***************
*** 1093,1099 ****
int size, pos;
struct re_registers *regs;
{
! return re_match_2 (pbufp, 0, 0, string, size, pos, regs, size);
}
#endif /* emacs */
--- 1093,1099 ----
int size, pos;
struct re_registers *regs;
{
! return re_match_2 (pbufp, 0, 0, (unsigned char *)string, size, pos, regs, size);
}
#endif /* emacs */
Technical Details
Message-ID:
<4205@orca.WV.TEK.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!zephyr.ens.tek.com!orca!frip!andrewShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!zephyr.ens.tek.com!orca!frip!andrew From: andrew@frip.WV.TEK.COM (Andrew Klossner) Newsgroups: gnu.g++.lib.bug Subject: compiler warnings in src/regex.c Message-ID: <4205@orca.WV.TEK.COM> Date: 11 Aug 89 22:44:42 GMT Sender: nobody@orca.WV.TEK.COM Distribution: gnu Organization: Tektronix, Wilsonville, Oregon Lines: 50