Whamcloud - gitweb
Fix many (mostly un-serious) build warnings
authorpschwan <pschwan>
Thu, 20 Jun 2002 23:52:35 +0000 (23:52 +0000)
committerpschwan <pschwan>
Thu, 20 Jun 2002 23:52:35 +0000 (23:52 +0000)
lustre/ldlm/ldlm_lockd.c
lustre/ldlm/ldlm_request.c
lustre/mdc/mdc_request.c
lustre/mds/handler.c
lustre/ost/ost_handler.c

index 7df018c..c8780cf 100644 (file)
@@ -80,13 +80,13 @@ static int _ldlm_enqueue(struct obd_device *obddev, struct ptlrpc_service *svc,
 {
         struct ldlm_reply *dlm_rep;
         struct ldlm_request *dlm_req;
-        int rc, size = sizeof(*dlm_rep), cookielen;
+        int rc, size = sizeof(*dlm_rep), cookielen = 0;
         __u32 flags;
         ldlm_error_t err;
         struct ldlm_lock *lock = NULL;
         ldlm_lock_callback callback;
         struct lustre_handle lockh;
-        void *cookie;
+        void *cookie = NULL;
         ENTRY;
 
         callback = ldlm_cli_callback;
index 5f566ad..2942d3f 100644 (file)
@@ -147,7 +147,7 @@ int ldlm_cli_callback(struct ldlm_lock *lock, struct ldlm_lock *new,
         struct ptlrpc_request *req;
         struct ptlrpc_client *cl =
                 &lock->l_resource->lr_namespace->ns_rpc_client;
-        int rc, size = sizeof(*body);
+        int rc = 0, size = sizeof(*body);
         ENTRY;
 
         req = ptlrpc_prep_req(cl, lock->l_connection, LDLM_CALLBACK, 1,
@@ -177,9 +177,8 @@ int ldlm_cli_callback(struct ldlm_lock *lock, struct ldlm_lock *new,
                 rc = ptlrpc_queue_wait(req);
                 rc = ptlrpc_check_status(req, rc);
                 ptlrpc_free_req(req);
-        } else {
+        } else
                 *reqp = req;
-        }
 
         EXIT;
  out:
index 924629e..7d2b570 100644 (file)
@@ -310,6 +310,7 @@ int mdc_enqueue(struct obd_conn *conn, int lock_type, struct lookup_intent *it,
                 req->rq_replen = lustre_msg_size(1, size);
         } else {
                 LBUG();
+                RETURN(-1);
         }
 #warning FIXME: the data here needs to be different if a lock was granted for a different inode
         rc = ldlm_cli_enqueue(mdc->mdc_ldlm_client, mdc->mdc_conn, req,
index 4e1d8ec..de7668c 100644 (file)
@@ -662,7 +662,7 @@ int mds_reint(int offset, struct ptlrpc_request *req)
 int mds_handle(struct obd_device *dev, struct ptlrpc_service *svc,
                struct ptlrpc_request *req)
 {
-        struct mds_obd *mds;
+        struct mds_obd *mds = NULL;
         int rc;
         ENTRY;
 
index 386cd7e..35dd39d 100644 (file)
@@ -490,7 +490,7 @@ static int ost_handle(struct obd_device *obddev, struct ptlrpc_service *svc,
                       struct ptlrpc_request *req)
 {
         int rc;
-        struct ost_obd *ost;
+        struct ost_obd *ost = NULL;
         ENTRY;
 
         rc = lustre_unpack_msg(req->rq_reqmsg, req->rq_reqlen);