-
Notifications
You must be signed in to change notification settings - Fork 482
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
Add strict-prototypes warning if supported. #284
Add strict-prototypes warning if supported. #284
Conversation
Ensure that all functions are correctly declared for c. There was one function in libsrtp that was not declared correctly and now it can be caught. This flags needed a custom program to check in configure, the built in function was invalid when using this flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I'll have to take your word that this works as intended. |
The change looks more of a headache than it is. The irony here is that the program used to check if └> gcc print.c -Wstrict-prototypes
print.c:20:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
int main()
^~~~ The only thing I cannot really test (only review by reading) is the windows specific things. |
Are people using ./configure on Windows? I just assumed they would use either the VS files or craft their own Makefile for VS. |
In FreeSWITCH we currently embed a version of the lib in our tree (we have some specific version requirements). We have project files built for libsrtp (vs2015) that we use to build. If thats wanted to be in libsrtp tree, we can clean those up and get them contributed. Just let me know |
@mjerris We actually have some VS2015 project files in the repo already. I've not used them personally, but I assume they work since @JonathanLennox provided them. In one of my projects, I used Linux to generate a config.h file, then modified it appropriately for Windows and manually included that in the project using VS2013. Anyway, we should have a clean build for Windows. I don't care how it gets done. |
Thats exactly how we built what we have. 2013 should upgrade cleanly to 2015 no problem. Haven't messed with 2017. 2013 is probably the right target at this point in time, and having anything else probably doesn't add a lot of value. |
Hi @mjerris , have you tired the project file that is currently checked in https://github.com/cisco/libsrtp/blob/master/srtp2.vcxproj If this differs to your own solution then can you create a new issues/pr with the details as it is off topic for this pr. We should definitely have an up to date windows build/project |
gcc 11.1.1 complains about not having strict function prototypes (-Wstrict-prototypes) when attempting to test for linkage with openssl. This warning was added in PR cisco#284. Why it started acting up now is unknown. It may be that gcc 11.1.1 have changed how and when they emit this warning. Adding void to the function declarations seems to silence this warning and allow the test to run to completion.
gcc 11.1.1 complains about not having strict function prototypes (-Wstrict-prototypes) when attempting to test for linkage with openssl. This warning was added in PR cisco#284. Why it started acting up now is unknown. It may be that gcc 11.1.1 have changed how and when they emit this warning. Adding void to the function declarations seems to silence this warning and allow the test to run to completion.
Ensure that all functions are correctly declared for c.
There was one function in libsrtp that was not declared correctly.
This flags needed a custom program to check in configure, the built
in function was invalid when using this flag.