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

Add strict-prototypes warning if supported. #284

Merged
merged 1 commit into from
Apr 3, 2017

Conversation

pabuhler
Copy link
Member

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.

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.
Copy link
Contributor

@thisisG thisisG left a comment

Choose a reason for hiding this comment

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

LGTM!

@paulej
Copy link
Contributor

paulej commented Mar 31, 2017

I'll have to take your word that this works as intended.

@thisisG
Copy link
Contributor

thisisG commented Mar 31, 2017

The change looks more of a headache than it is. The irony here is that the program used to check if -Wstrict-prototypes is allowed was incorrectly formed - disabling -Wstrict-prototypes. :-)

> 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.

@paulej
Copy link
Contributor

paulej commented Mar 31, 2017

Are people using ./configure on Windows? I just assumed they would use either the VS files or craft their own Makefile for VS.

@mjerris
Copy link

mjerris commented Mar 31, 2017

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

@paulej
Copy link
Contributor

paulej commented Mar 31, 2017

@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.

@mjerris
Copy link

mjerris commented Mar 31, 2017

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.

@pabuhler
Copy link
Member Author

pabuhler commented Apr 3, 2017

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

@pabuhler pabuhler merged commit e5531e8 into cisco:master Apr 3, 2017
thisisG added a commit to thisisG/libsrtp that referenced this pull request Apr 9, 2017
thisisG added a commit to thisisG/libsrtp that referenced this pull request May 20, 2017
thisisG added a commit to thisisG/libsrtp that referenced this pull request Jun 9, 2021
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.
bifurcation pushed a commit to bifurcation/libsrtp that referenced this pull request Jul 19, 2021
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.
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.

4 participants