Whamcloud - gitweb
LU-18988 kfilnd: add return value after LBUGs 57/59157/2
authorGian-Carlo DeFazio <defazio1@llnl.gov>
Thu, 8 May 2025 17:12:02 +0000 (10:12 -0700)
committerOleg Drokin <green@whamcloud.com>
Tue, 27 May 2025 04:06:53 +0000 (04:06 +0000)
To get rid of compiler warnings of the kind
"control reaches end of non-void function",
add return statements after LBUGs.

Signed-off-by: Gian-Carlo DeFazio <defazio1@llnl.gov>
Change-Id: Ie8596c7527fa68f88e807ca290157b4a4dc891cf
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59157
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lnet/klnds/kfilnd/kfilnd_tn.c

index 758c9d9..f22820c 100644 (file)
@@ -567,12 +567,14 @@ static int kfilnd_tn_state_send_failed(struct kfilnd_transaction *tn,
                                        "Unexpected error during cancel tagged receive: rc=%d",
                                        rc);
                        LBUG();
+                       return -EINVAL;
                }
                break;
 
        default:
                KFILND_TN_ERROR(tn, "Invalid %s event", tn_event_to_str(event));
                LBUG();
+               return -EINVAL;
        }
 }
 
@@ -633,6 +635,7 @@ static int kfilnd_tn_state_tagged_recv_posted(struct kfilnd_transaction *tn,
        default:
                KFILND_TN_ERROR(tn, "Invalid %s event", tn_event_to_str(event));
                LBUG();
+               return -EINVAL;
        }
 }