From cb787a75a5a88cc376ed34e8271971b6194eb225 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Thu, 24 Aug 2000 19:11:16 +0200
Subject: [PATCH] Fixed a few warnings.

Rev: src/builtin_functions.c:1.301
Rev: src/modules/Gmp/mpz_glue.c:1.82
Rev: src/object.c:1.146
---
 src/builtin_functions.c    |  8 ++++----
 src/modules/Gmp/mpz_glue.c | 24 ++++++++++++------------
 src/object.c               |  8 ++++----
 3 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/src/builtin_functions.c b/src/builtin_functions.c
index 6a17afbe61..9784f09e61 100644
--- a/src/builtin_functions.c
+++ b/src/builtin_functions.c
@@ -5,7 +5,7 @@
 \*/
 /**/
 #include "global.h"
-RCSID("$Id: builtin_functions.c,v 1.300 2000/08/24 04:04:40 hubbe Exp $");
+RCSID("$Id: builtin_functions.c,v 1.301 2000/08/24 17:11:16 grubba Exp $");
 #include "interpret.h"
 #include "svalue.h"
 #include "pike_macros.h"
@@ -83,7 +83,7 @@ PMOD_EXPORT void debug_f_aggregate(INT32 args)
 
 void f_hash(INT32 args)
 {
-  size_t i;
+  size_t i = 0;
 
   if(!args)
     SIMPLE_TOO_FEW_ARGS_ERROR("hash",1);
@@ -1684,7 +1684,7 @@ PMOD_EXPORT void f_destruct(INT32 args)
 PMOD_EXPORT void f_indices(INT32 args)
 {
   ptrdiff_t size;
-  struct array *a;
+  struct array *a = NULL;
 
   if(args < 1)
     SIMPLE_TOO_FEW_ARGS_ERROR("indices", 1);
@@ -1951,7 +1951,7 @@ static node *fix_aggregate_mapping_type(node *n)
 PMOD_EXPORT void f_values(INT32 args)
 {
   ptrdiff_t size;
-  struct array *a;
+  struct array *a = NULL;
   if(args < 1)
     SIMPLE_TOO_FEW_ARGS_ERROR("values", 1);
 
diff --git a/src/modules/Gmp/mpz_glue.c b/src/modules/Gmp/mpz_glue.c
index fcf57d67fa..8410cba4ab 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.81 2000/08/10 09:51:52 per Exp $");
+RCSID("$Id: mpz_glue.c,v 1.82 2000/08/24 17:05:38 grubba Exp $");
 #include "gmp_machine.h"
 
 #if defined(HAVE_GMP2_GMP_H) && defined(HAVE_LIBGMP2)
@@ -902,7 +902,7 @@ static void mpzmod_sub(INT32 args)
 
 static void mpzmod_rsub(INT32 args)
 {
-  struct object *res;
+  struct object *res = NULL;
   MP_INT *a;
   
   if(args!=1)
@@ -946,7 +946,7 @@ static void mpzmod_div(INT32 args)
 static void mpzmod_rdiv(INT32 args)
 {
   MP_INT *a;
-  struct object *res;
+  struct object *res = NULL;
   if(!mpz_sgn(THIS))
     error("Division by zero.\n");
 
@@ -982,7 +982,7 @@ static void mpzmod_mod(INT32 args)
 static void mpzmod_rmod(INT32 args)
 {
   MP_INT *a;
-  struct object *res;
+  struct object *res = NULL;
   if(!mpz_sgn(THIS))
     error("Modulo by zero.\n");
 
@@ -1210,7 +1210,7 @@ static void mpzmod_sqrtrem(INT32 args)
 
 static void mpzmod_lsh(INT32 args)
 {
-  struct object *res;
+  struct object *res = NULL;
   if (args != 1)
     error("Wrong number of arguments to Gmp.mpz->`<<.\n");
   ref_push_string(int_type_string);
@@ -1226,7 +1226,7 @@ static void mpzmod_lsh(INT32 args)
 
 static void mpzmod_rsh(INT32 args)
 {
-  struct object *res;
+  struct object *res = NULL;
   if (args != 1)
     error("Wrong number of arguments to Gmp.mpz->`>>.\n");
   ref_push_string(int_type_string);
@@ -1242,7 +1242,7 @@ static void mpzmod_rsh(INT32 args)
 
 static void mpzmod_rlsh(INT32 args)
 {
-  struct object *res;
+  struct object *res = NULL;
   INT32 i;
   if (args != 1)
     error("Wrong number of arguments to Gmp.mpz->``<<.\n");
@@ -1259,7 +1259,7 @@ static void mpzmod_rlsh(INT32 args)
 
 static void mpzmod_rrsh(INT32 args)
 {
-  struct object *res;
+  struct object *res = NULL;
   INT32 i;
   if (args != 1)
     error("Wrong number of arguments to Gmp.mpz->``>>.\n");
@@ -1275,7 +1275,7 @@ static void mpzmod_rrsh(INT32 args)
 
 static void mpzmod_powm(INT32 args)
 {
-  struct object *res;
+  struct object *res = NULL;
   MP_INT *n;
   
   if(args != 2)
@@ -1292,7 +1292,7 @@ static void mpzmod_powm(INT32 args)
 
 static void mpzmod_pow(INT32 args)
 {
-  struct object *res;
+  struct object *res = NULL;
   
   if (args != 1)
     error("Gmp.mpz->pow: Wrong number of arguments.\n");
@@ -1337,7 +1337,7 @@ static void mpzmod_popcount(INT32 args)
 
 static void gmp_pow(INT32 args)
 {
-  struct object *res;
+  struct object *res = NULL;
   if (args != 2)
     error("Gmp.pow: Wrong number of arguments");
   if ( (sp[-2].type != T_INT) || (sp[-2].u.integer < 0)
@@ -1351,7 +1351,7 @@ static void gmp_pow(INT32 args)
 
 static void gmp_fac(INT32 args)
 {
-  struct object *res;
+  struct object *res = NULL;
   if (args != 1)
     error("Gmp.fac: Wrong number of arguments.\n");
   if (sp[-1].type != T_INT)
diff --git a/src/object.c b/src/object.c
index 5dd1f07c1a..d2674b91c7 100644
--- a/src/object.c
+++ b/src/object.c
@@ -5,7 +5,7 @@
 \*/
 /**/
 #include "global.h"
-RCSID("$Id: object.c,v 1.145 2000/08/24 04:04:41 hubbe Exp $");
+RCSID("$Id: object.c,v 1.146 2000/08/24 17:09:41 grubba Exp $");
 #include "object.h"
 #include "dynamic_buffer.h"
 #include "interpret.h"
@@ -867,7 +867,7 @@ PMOD_EXPORT void object_index_no_free(struct svalue *to,
 			   struct object *o,
 			   struct svalue *index)
 {
-  struct program *p;
+  struct program *p = NULL;
   int lfun;
 
   if(!o || !(p=o->prog))
@@ -895,7 +895,7 @@ PMOD_EXPORT void object_low_set_index(struct object *o,
 			  struct svalue *from)
 {
   struct identifier *i;
-  struct program *p;
+  struct program *p = NULL;
 
   if(!o || !(p=o->prog))
   {
@@ -976,7 +976,7 @@ PMOD_EXPORT void object_set_index(struct object *o,
 		       struct svalue *index,
 		       struct svalue *from)
 {
-  struct program *p;
+  struct program *p = NULL;
   int lfun;
 
   if(!o || !(p=o->prog))
-- 
GitLab