From 3ef248fbf5aa479585ffd3335a257a5d564e9822 Mon Sep 17 00:00:00 2001 From: Fredrik Noring <noring@nocrew.org> Date: Fri, 22 Oct 1999 20:16:17 +0200 Subject: [PATCH] Fixed warnings. Rev: src/modules/Gmp/mpz_glue.c:1.51 Rev: src/opcodes.c:1.47 Rev: src/stralloc.h:1.36 --- src/modules/Gmp/mpz_glue.c | 4 ++-- src/opcodes.c | 8 ++++---- src/stralloc.h | 5 ++++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/modules/Gmp/mpz_glue.c b/src/modules/Gmp/mpz_glue.c index 59930f2c50..e717fd5562 100644 --- a/src/modules/Gmp/mpz_glue.c +++ b/src/modules/Gmp/mpz_glue.c @@ -4,7 +4,7 @@ ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" -RCSID("$Id: mpz_glue.c,v 1.50 1999/10/22 16:50:56 noring Exp $"); +RCSID("$Id: mpz_glue.c,v 1.51 1999/10/22 18:16:17 noring Exp $"); #include "gmp_machine.h" #if defined(HAVE_GMP2_GMP_H) && defined(HAVE_LIBGMP2) @@ -172,7 +172,7 @@ static void mpzmod_get_float(INT32 args) static struct pike_string *low_get_digits(MP_INT *mpz, int base) { - struct pike_string *s; + struct pike_string *s = 0; /* Make gcc happy. */ INT32 len; if ( (base >= 2) && (base <= 36)) diff --git a/src/opcodes.c b/src/opcodes.c index fd1043cd08..00b233a50b 100644 --- a/src/opcodes.c +++ b/src/opcodes.c @@ -24,7 +24,7 @@ #include "security.h" #include "bignum.h" -RCSID("$Id: opcodes.c,v 1.46 1999/10/22 16:50:53 noring Exp $"); +RCSID("$Id: opcodes.c,v 1.47 1999/10/22 18:16:15 noring Exp $"); void index_no_free(struct svalue *to,struct svalue *what,struct svalue *ind) { @@ -235,7 +235,8 @@ void o_cast(struct pike_string *type, INT32 run_time_type) case T_FLOAT: { - FLOAT_TYPE f; + FLOAT_TYPE f = 0.0; + switch(sp[-1].type) { case T_INT: @@ -249,7 +250,6 @@ void o_cast(struct pike_string *type, INT32 run_time_type) default: error("Cannot cast %s to float.\n",get_name_of_type(sp[-1].type)); - f=0.0; } sp[-1].type=T_FLOAT; @@ -742,7 +742,7 @@ static INT32 really_low_sscanf(char *input, { struct svalue sval; int e,cnt,matches,eye,arg; - int no_assign,field_length,minus_flag; + int no_assign = 0, field_length = 0, minus_flag = 0; char set[256]; struct svalue *argp; diff --git a/src/stralloc.h b/src/stralloc.h index d0dcd63a2b..259fd68084 100644 --- a/src/stralloc.h +++ b/src/stralloc.h @@ -5,7 +5,7 @@ \*/ /* - * $Id: stralloc.h,v 1.35 1999/06/30 18:33:13 hubbe Exp $ + * $Id: stralloc.h,v 1.36 1999/10/22 18:16:16 noring Exp $ */ #ifndef STRALLOC_H #define STRALLOC_H @@ -144,6 +144,9 @@ INLINE INT32 PIKE_CONCAT4(compare_,FROM,_to_,TO)(const PIKE_CONCAT(p_wchar,TO) * /* Prototypes begin here */ +int string_to_svalue_inumber(struct svalue *r, char *str, char **ptr, int base, + int maxlength); +int convert_stack_top_string_to_inumber(int base); INLINE unsigned INT32 index_shared_string(struct pike_string *s, int pos); INLINE void low_set_index(struct pike_string *s, int pos, int value); INLINE struct pike_string *debug_check_size_shift(struct pike_string *a,int shift); -- GitLab