[flang-commits] [flang] c11def8 - [flang] Fix a warning

Kazu Hirata via flang-commits flang-commits at lists.llvm.org
Fri Oct 14 08:51:48 PDT 2022


Author: Kazu Hirata
Date: 2022-10-14T08:51:37-07:00
New Revision: c11def8724ab53e8b0305b4ea5b0ef32a9c89f58

URL: https://github.com/llvm/llvm-project/commit/c11def8724ab53e8b0305b4ea5b0ef32a9c89f58
DIFF: https://github.com/llvm/llvm-project/commit/c11def8724ab53e8b0305b4ea5b0ef32a9c89f58.diff

LOG: [flang] Fix a warning

This patch fixes:

  flang/lib/Lower/ConvertExpr.cpp:2733:14: error: variable
  'callNumResults' set but not used
  [-Werror,-Wunused-but-set-variable]

Added: 
    

Modified: 
    flang/lib/Lower/ConvertExpr.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Lower/ConvertExpr.cpp b/flang/lib/Lower/ConvertExpr.cpp
index 634244c2c047c..a180553ae0190 100644
--- a/flang/lib/Lower/ConvertExpr.cpp
+++ b/flang/lib/Lower/ConvertExpr.cpp
@@ -2794,6 +2794,7 @@ class ScalarExprLowering {
     // function return value.
     assert(callNumResults == 1 &&
            "Expected exactly one result in FUNCTION call");
+    (void)callNumResults;
 
     // Call a BIND(C) function that return a char.
     if (caller.characterize().IsBindC() &&


        


More information about the flang-commits mailing list