Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[flang] Remove duplicate call to va_end() #86865

Merged
merged 1 commit into from Mar 28, 2024

Conversation

marcauberer
Copy link
Member

Fixes #86825

@llvmbot llvmbot added flang:runtime flang Flang issues not falling into any other category labels Mar 27, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Mar 27, 2024

@llvm/pr-subscribers-flang-runtime

Author: Marc Auberer (marcauberer)

Changes

Fixes #86825


Full diff: https://github.com/llvm/llvm-project/pull/86865.diff

1 Files Affected:

  • (modified) flang/runtime/io-error.cpp (-3)
diff --git a/flang/runtime/io-error.cpp b/flang/runtime/io-error.cpp
index 02f237f05bea15..b006b82f622491 100644
--- a/flang/runtime/io-error.cpp
+++ b/flang/runtime/io-error.cpp
@@ -56,9 +56,6 @@ void IoErrorHandler::SignalError(int iostatOrErrno, const char *msg, ...) {
 #endif
           ioMsg_ = SaveDefaultCharacter(
               buffer, Fortran::runtime::strlen(buffer) + 1, *this);
-#if !defined(RT_DEVICE_COMPILATION)
-          va_end(ap);
-#endif
         }
       }
       return;

Copy link
Contributor

@vzakhari vzakhari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Thank you for the fix!

@marcauberer marcauberer merged commit 9d61f7e into llvm:main Mar 28, 2024
7 checks passed
@marcauberer marcauberer deleted the flang/code-quality branch March 28, 2024 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:runtime flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

flang/runtime/io-error.cpp:60: bad call to va_end ?
3 participants