rewrite XPtrV to use size_t instead of pointer arithmetic, for gcc-snapshot (20120930-1) -fstrict-overflow -Wstrict-overflow=9
This commit is contained in:
4
syn.c
4
syn.c
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/syn.c,v 1.80 2012/08/17 18:34:25 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/syn.c,v 1.81 2012/10/03 15:50:32 tg Exp $");
|
||||
|
||||
extern void yyskiputf8bom(void);
|
||||
|
||||
@@ -319,7 +319,7 @@ get_command(int cf)
|
||||
ACCEPT;
|
||||
|
||||
/* manipulate the vars string */
|
||||
tcp = *(--vars.cur);
|
||||
tcp = XPptrv(vars)[(vars.len = 0)];
|
||||
/* 'varname=' -> 'varname' */
|
||||
tcp[wdscan(tcp, EOS) - tcp - 3] = EOS;
|
||||
|
||||
|
Reference in New Issue
Block a user