Skip to content

Better warning when in Fortran a program unit or routine is not closed #10607

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

albert-github
Copy link
Collaborator

Analogues to #10587 we also need warnings for program units and as it can be nested we need a stack to record what is still open.

Example: example.tar.gz

(Found by Fossies for the rlab package)

Analogues to doxygen#10587 we also need warnings for program units and as it can be nested we need a stack to record what is still open.
QCString blockString;
int blockLineNr = -1;
};
std::stack<blockState> g_blockStack;
Copy link
Owner

Choose a reason for hiding this comment

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

Global variables will create data races and crashes when using multiple threads (e.g. NUM_PROC_THREADS!=1).
Assuming this state is per file, you need to put this variable in fortranscannerYY_state and access it via yyextra.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think the commit e87e708 from February 17, 2024 fixes this problem.

After review, global variables are not thread safe use thread safe construct
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants