fix type (array indices should be of the unsigned arithmetic type)
This commit is contained in:
parent
d5d6e97683
commit
4e5553bcb4
4
sh.h
4
sh.h
|
@ -134,7 +134,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef EXTERN
|
#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
|
#endif
|
||||||
#define MKSH_VERSION "R39 2009/08/08"
|
#define MKSH_VERSION "R39 2009/08/08"
|
||||||
|
|
||||||
|
@ -1647,7 +1647,7 @@ void change_random(unsigned long);
|
||||||
void change_winsz(void);
|
void change_winsz(void);
|
||||||
int array_ref_len(const char *);
|
int array_ref_len(const char *);
|
||||||
char *arrayname(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 {
|
enum Test_op {
|
||||||
TO_NONOP = 0, /* non-operator */
|
TO_NONOP = 0, /* non-operator */
|
||||||
|
|
6
var.c
6
var.c
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
#include "sh.h"
|
#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
|
* Variables
|
||||||
|
@ -1316,11 +1316,11 @@ arrayname(const char *str)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set (or overwrite, if reset) the array variable var to the values in vals */
|
/* 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)
|
set_array(const char *var, bool reset, const char **vals)
|
||||||
{
|
{
|
||||||
struct tbl *vp, *vq;
|
struct tbl *vp, *vq;
|
||||||
uint32_t i;
|
mksh_uari_t i;
|
||||||
|
|
||||||
/* to get local array, use "typeset foo; set -A foo" */
|
/* to get local array, use "typeset foo; set -A foo" */
|
||||||
vp = global(var);
|
vp = global(var);
|
||||||
|
|
Loading…
Reference in New Issue