Fixed up more possibly uninitialized variables.
authorRichard Sharpe <sharpe@samba.org>
Sun, 27 Sep 1998 08:29:50 +0000 (08:29 +0000)
committerRichard Sharpe <sharpe@samba.org>
Sun, 27 Sep 1998 08:29:50 +0000 (08:29 +0000)
Now only two compilation warnings seem to be left.

Luke may want to check the changes I made.
(This used to be commit 2456c95c1664a57aa939695c884ec666ec8168ec)

source3/client/client.c
source3/rpcclient/cmd_samr.c
source3/rpcclient/rpcclient.c
source3/utils/smbpasswd.c

index 1d3623aef245d04321c81c033fe941dbfcdcc731..5d3f497ab1e6cdd90a5b80076be02b73147018ea 100644 (file)
@@ -3371,7 +3371,7 @@ static void cmd_help(char *dum_in, char *dum_out)
       }
 }
 
-
+#ifdef 0
 
 /****************************************************************************
 wait for keyboard activity, swallowing network packets
@@ -3406,7 +3406,7 @@ static void wait_keyboard(char *buffer)
       chkpath("\\",False);
     }  
 }
-
+#endif
 #ifdef HAVE_LIBREADLINE
 
 /****************************************************************************
@@ -3837,7 +3837,7 @@ static void usage(char *pname)
 
   if (getenv("PASSWD_FD") || getenv("PASSWD_FILE")) {
     int fd = -1;
-    BOOL close_it;
+    BOOL close_it = False;
     pstring spec;
     char pass[128];
 
index 6f7cdcada160f64f587b693d498b41d4e01530e4..c90b0baf25783aa337d77e6e08fc438921857435 100644 (file)
@@ -265,7 +265,7 @@ void cmd_sam_query_user(struct client_info *info)
        fstring domain;
        fstring sid;
        DOM_SID sid1;
-       int user_idx;
+       int user_idx = 0;  /* FIXME maybe ... */
        BOOL res = True;
        uint32 admin_rid = 0x304; /* absolutely no idea. */
        fstring rid_str ;
index a994fc27fcbc0c9cdaf30e0af4299e70a7c528b6..203b2c00bffa5340dd0e5bbc97bb4cf49b5f39e3 100644 (file)
@@ -546,7 +546,10 @@ enum client_action
                {
                        case 'm':
                        {
-                               int max_protocol = interpret_protocol(optarg,max_protocol);
+                               /* FIXME ... max_protocol seems to be funny here */
+
+                               int max_protocol = 0;
+                               max_protocol = interpret_protocol(optarg,max_protocol);
                                fprintf(stderr, "max protocol not currently supported\n");
                                break;
                        }
index 2ac44fbdecdcb4b9a439528b49eeb2327a0cb101..e5e5424a2b8f8db2fb345c0a7105ab8e43dc5124 100644 (file)
@@ -173,7 +173,7 @@ int main(int argc, char **argv)
   extern int optind;
   extern int DEBUGLEVEL;
   int             real_uid;
-  struct passwd  *pwd;
+  struct passwd  *pwd = NULL;
   fstring         old_passwd;
   fstring         new_passwd;
   uchar           new_p16[16];