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

[autoconf] Fixed .git submodule detection test. #1507

Merged
merged 1 commit into from
Mar 31, 2022

Conversation

dsokoloski
Copy link
Contributor

@dsokoloski dsokoloski commented Mar 30, 2022

The .git submodule detection test does not check that the path within the parent project actually exists. The result is that the NDPI_API_VERSION define can be left empty and subsequent compilation will fail with:

ndpi_main.c: In function 'ndpi_get_api_version':
ndpi_main.c:7641:26: error: expected expression before ')' token
   return(NDPI_API_VERSION);
                          ^
ndpi_main.c:7642:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^

This PR adds a check to ensure the parent's path exists and is a directory.

This was discovered while building for OpenWrt.

Signed-off-by: Darryl Sokoloski [email protected]

@sonarcloud
Copy link

sonarcloud bot commented Mar 30, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@utoni utoni merged commit 46dc8b5 into ntop:dev Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants