Skip to content

Commit

Permalink
Add (void) argument to be ANSI C compliant
Browse files Browse the repository at this point in the history
Add void argument has to avoid warning messages when compiling python
bindings with CFFI since it uses -Wstrict-prototypes option by default.

Modify`msc_create_rules_set` and `msc_init` internals, now it returns
directly an instance like `msc_new_transaction` in transaction.cc.
  • Loading branch information
soonum authored and zimmerle committed Dec 1, 2016
1 parent 1719e1d commit 8998780
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions src/modsecurity.cc
Expand Up @@ -255,10 +255,8 @@ extern "C" void msc_cleanup(ModSecurity *msc) {
*
* @endcode
*/
extern "C" ModSecurity *msc_init() {
ModSecurity *modsec = new ModSecurity();

return modsec;
extern "C" ModSecurity *msc_init(void) {
return new ModSecurity();
}


Expand Down
6 changes: 2 additions & 4 deletions src/rules.cc
Expand Up @@ -309,10 +309,8 @@ void Rules::dump() {
}


extern "C" Rules *msc_create_rules_set() {
Rules *rules = new Rules();

return rules;
extern "C" Rules *msc_create_rules_set(void) {
return new Rules();
}


Expand Down

0 comments on commit 8998780

Please sign in to comment.