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

Fix gcc warings - alternative to #2061 #2068

Merged
merged 2 commits into from
Aug 28, 2020

Commits on Aug 25, 2020

  1. Fix gcc warning about mismatching function pointer

    ../../../../ext/nokogiri/xml_document.c: In function ‘dealloc’:
    ../../../../ext/nokogiri/xml_document.c:58:25: warning: passing argument 2 of ‘rb_st_foreach’ from incompatible pointer type [-Wincompatible-pointer-types]
       58 |   st_foreach(node_hash, dealloc_node_i, (st_data_t)doc);
          |                         ^~~~~~~~~~~~~~
          |                         |
          |                         int (*)(xmlNode *, xmlNode *, xmlDoc *) {aka int (*)(struct _xmlNode *, struct _xmlNode *, struct _xmlDoc *)}
    larskanis committed Aug 25, 2020
    Configuration menu
    Copy the full SHA
    7c46f73 View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2020

  1. Fix gcc warning about mismatching function pointers

    ../../../../ext/nokogiri/xml_io.c: In function ‘io_read_callback’:
    ../../../../ext/nokogiri/xml_io.c:20:22: warning: passing argument 1 of ‘rb_rescue’ from incompatible pointer type [-Wincompatible-pointer-types]
       20 |   string = rb_rescue(read_check, (VALUE)args, read_failed, 0);
          |                      ^~~~~~~~~~
          |                      |
          |                      VALUE (*)(VALUE *) {aka long unsigned int (*)(long unsigned int *)}
    
    and
    
    ../../../../ext/nokogiri/xml_io.c:20:47: warning: passing argument 3 of ‘rb_rescue’ from incompatible pointer type [-Wincompatible-pointer-types]
       20 |   string = rb_rescue(read_check, (VALUE)args, read_failed, 0);
          |                                               ^~~~~~~~~~~
          |                                               |
          |                                               VALUE (*)(void) {aka long unsigned int (*)(void)}
    larskanis committed Aug 26, 2020
    Configuration menu
    Copy the full SHA
    6c0af79 View commit details
    Browse the repository at this point in the history