fix type (array indices should be of the unsigned arithmetic type)

This commit is contained in:
tg 2009-08-28 22:23:34 +00:00
parent d5d6e97683
commit 4e5553bcb4
2 changed files with 5 additions and 5 deletions

4
sh.h
View File

@ -134,7 +134,7 @@
#endif
#ifdef EXTERN
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.332 2009/08/28 21:07:27 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.333 2009/08/28 22:23:34 tg Exp $");
#endif
#define MKSH_VERSION "R39 2009/08/08"
@ -1647,7 +1647,7 @@ void change_random(unsigned long);
void change_winsz(void);
int array_ref_len(const char *);
char *arrayname(const char *);
uint32_t set_array(const char *, bool, const char **);
mksh_uari_t set_array(const char *, bool, const char **);
enum Test_op {
TO_NONOP = 0, /* non-operator */

6
var.c
View File

@ -22,7 +22,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.84 2009/08/28 21:07:27 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.85 2009/08/28 22:23:33 tg Exp $");
/*
* Variables
@ -1316,11 +1316,11 @@ arrayname(const char *str)
}
/* set (or overwrite, if reset) the array variable var to the values in vals */
uint32_t
mksh_uari_t
set_array(const char *var, bool reset, const char **vals)
{
struct tbl *vp, *vq;
uint32_t i;
mksh_uari_t i;
/* to get local array, use "typeset foo; set -A foo" */
vp = global(var);