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 correct C function prototypes for msc_init and msc_create_rule_set #1922

Closed

Conversation

stevendore
Copy link
Contributor

C function prototypes require a void parameter otherwise the error: function declaration isn't a prototype will be thrown in some compilers with -Werror=strict-prototype set.

@victorhora victorhora self-assigned this Oct 10, 2018
@victorhora victorhora added enhancement 3.x Related to ModSecurity version 3.x labels Oct 10, 2018
@victorhora victorhora added this to the v3.0.3 milestone Oct 10, 2018
Copy link
Contributor

@victorhora victorhora left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @steven-j-wojcik :)

It took me some time to figure out why I was getting cc1: error: -Werror=strict-prototype: no option -Wstrict-prototypeerror. The option is named strict-prototypes and not strict-prototype.

In file included from multi.c:16:0:
../../headers/modsecurity/modsecurity.h:320:1: error: function declaration isn’t a prototype [-Werror=strict-prototypes]
 ModSecurity *msc_init();
 ^
In file included from multi.c:18:0:
../../headers/modsecurity/rules.h:99:1: error: function declaration isn’t a prototype [-Werror=strict-prototypes]
 Rules *msc_create_rules_set();
 ^
cc1: some warnings being treated as errors

Pull request fixes the issue. Merging ;)

victorhora added a commit that referenced this pull request Oct 13, 2018
@victorhora
Copy link
Contributor

Merged at 004047e.

@victorhora victorhora closed this Oct 13, 2018
@stevendore stevendore deleted the fix_c_prototypes branch October 14, 2018 01:02
zimmerle pushed a commit that referenced this pull request Oct 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x Related to ModSecurity version 3.x enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants