Whamcloud - gitweb
Fix compiler warnings.
[fs/lustre-release.git] / lustre / ost / ost_handler.c
index 45c5102..6a0c402 100644 (file)
@@ -89,7 +89,8 @@ static int ost_destroy(struct obd_export *exp, struct ptlrpc_request *req,
                        struct obd_trans_info *oti)
 {
         struct ost_body *body, *repbody;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
+        __u32 size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
+        int rc;
         ENTRY;
 
         body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body),
@@ -126,7 +127,8 @@ static int ost_getattr(struct obd_export *exp, struct ptlrpc_request *req)
 {
         struct ost_body *body, *repbody;
         struct obd_info oinfo = { { { 0 } } };
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
+        __u32 size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
+        int rc;
         ENTRY;
 
         body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body),
@@ -153,7 +155,8 @@ static int ost_getattr(struct obd_export *exp, struct ptlrpc_request *req)
 static int ost_statfs(struct ptlrpc_request *req)
 {
         struct obd_statfs *osfs;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*osfs) };
+        __u32 size[2] = { sizeof(struct ptlrpc_body), sizeof(*osfs) };
+        int rc;
         ENTRY;
 
         rc = lustre_pack_reply(req, 2, size, NULL);
@@ -176,7 +179,8 @@ static int ost_create(struct obd_export *exp, struct ptlrpc_request *req,
                       struct obd_trans_info *oti)
 {
         struct ost_body *body, *repbody;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*repbody) };
+        __u32 size[2] = { sizeof(struct ptlrpc_body), sizeof(*repbody) };
+        int rc;
         ENTRY;
 
         body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body),
@@ -264,7 +268,8 @@ static int ost_punch(struct obd_export *exp, struct ptlrpc_request *req,
 {
         struct obd_info oinfo = { { { 0 } } };
         struct ost_body *body, *repbody;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*repbody) };
+        __u32 size[2] = { sizeof(struct ptlrpc_body), sizeof(*repbody) };
+        int rc;
         struct lustre_handle lh = {0,};
         ENTRY;
 
@@ -315,7 +320,8 @@ static int ost_sync(struct obd_export *exp, struct ptlrpc_request *req)
 {
         struct ost_body *body, *repbody;
         struct lustre_capa *capa = NULL;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*repbody) };
+        __u32 size[2] = { sizeof(struct ptlrpc_body), sizeof(*repbody) };
+        int rc;
         ENTRY;
 
         body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body),
@@ -342,7 +348,8 @@ static int ost_setattr(struct obd_export *exp, struct ptlrpc_request *req,
                        struct obd_trans_info *oti)
 {
         struct ost_body *body, *repbody;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*repbody) };
+        __u32 size[2] = { sizeof(struct ptlrpc_body), sizeof(*repbody) };
+        int rc;
         struct obd_info oinfo = { { { 0 } } };
         ENTRY;
 
@@ -676,7 +683,7 @@ static int ost_brw_read(struct ptlrpc_request *req, struct obd_trans_info *oti)
         struct lustre_capa *capa = NULL;
         struct l_wait_info lwi;
         struct lustre_handle lockh = { 0 };
-        int size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
+        __u32  size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
         int niocount, npages, nob = 0, rc, i;
         int no_reply = 0;
         ENTRY;
@@ -950,7 +957,7 @@ static int ost_brw_write(struct ptlrpc_request *req, struct obd_trans_info *oti)
         struct lustre_handle     lockh = {0};
         struct lustre_capa      *capa = NULL;
         __u32                   *rcs;
-        int size[3] = { sizeof(struct ptlrpc_body), sizeof(*body) };
+        __u32 size[3] = { sizeof(struct ptlrpc_body), sizeof(*body) };
         int objcount, niocount, npages;
         int rc, swab, i, j;
         obd_count                client_cksum = 0, server_cksum = 0;
@@ -1353,7 +1360,8 @@ static int ost_get_info(struct obd_export *exp, struct ptlrpc_request *req)
 static int ost_handle_quotactl(struct ptlrpc_request *req)
 {
         struct obd_quotactl *oqctl, *repoqc;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*repoqc) };
+        __u32 size[2] = { sizeof(struct ptlrpc_body), sizeof(*repoqc) };
+        int rc;
         ENTRY;
 
         oqctl = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*oqctl),