fungos / cr

cr.h: A Simple C Hot Reload Header-only Library
https://fungos.github.io/cr-simple-c-hot-reload/
MIT License
1.54k stars 101 forks source link

cr_pdb_process has unused arguments #53

Closed skypjack closed 4 years ago

skypjack commented 4 years ago

The function in the object is defined as:

bool static cr_pdb_process(const std::string &source,
                           const std::string &desination) {
    std::string folder, fname, ext, orig_pdb;
    cr_split_path(desination, folder, fname, ext);
    bool result = cr_pdb_replace(desination, fname + ".pdb", orig_pdb);
    result &= cr_copy(orig_pdb, cr_replace_extension(desination, ".pdb"));
    return result;
}

As you can see, source isn't used at all. This triggers a lot of warnings when including cr. Is it possible to suppress them by removing the unused argument from the function definition? I can also open a PR for that, just let me know if it makes sense to you to update this function.

Thanks.

skypjack commented 4 years ago

cr_dl_header_handler suffers from the same problem, it doesn't use parameter size afaik.

fungos commented 4 years ago

Sure, the PR is welcome :)

fungos commented 4 years ago

Merged #54