Skip to content

Commit

Permalink
Add attribute for gcc about unused variable (#18)
Browse files Browse the repository at this point in the history
* Add attribute for gcc about unused variable

* Also fix depricated name Config -> Build
  • Loading branch information
triptec authored and dginev committed Nov 9, 2017
1 parent 11854e1 commit aafc653
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
extern crate gcc;

fn main() {
gcc::Config::new()
gcc::Build::new()
.file("src/helper_functions.c")
.include("/usr/include/libxml2")
.compile("libhelper_functions.a");
Expand Down
2 changes: 1 addition & 1 deletion src/helper_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ int htmlWellFormed(htmlParserCtxtPtr ctxt) {
}

// dummy function: no debug output at all
void _ignoreInvalidTagsErrorFunc(void * userData, xmlErrorPtr error) {
void _ignoreInvalidTagsErrorFunc(void * userData __attribute__ ((unused)), xmlErrorPtr error) {
if ((error != NULL) && (error->code == XML_HTML_UNKNOWN_TAG)) { // do not record invalid, in fact (out of despair) claim we ARE well-formed, when a tag is invalid.
hacky_well_formed = 1;
}
Expand Down

0 comments on commit aafc653

Please sign in to comment.