The functions with no return type I discovered myself during my foray into /W4, those were accidental and I'm not even sure how that happened. I must have been falling over tired when I wrote something like
static js_BindJoystickButton. I fixed it in my latest commit.
As for const-correctness, from what I understand - if we're being technical about it it's not undefined behavior to cast away constness (C++ has const_cast for a reason), it's only UB if you
write to an actual constant. I'm not saying this isn't a potential source of bugs of course, just want to dispel any misconceptions. That said, const-correctness
is something I do take seriously (if you look at the code, I declare a good number of const pointers myself), but if MSVC doesn't warn me about it, I may not always catch violations. But even with /W4, I don't get any such warnings, and /Wall is just unfeasible as mentioned above. Clang must just be REALLY pedantic.
I did fix the no-return functions in the latest commit, I added a noreturn macro so I can now use
noreturn in place of a return type. I wasn't aware GCC would accept the
__attributes__ before the function declaration, I thought it had to go after, which would have complicated the macro. Thanks for the tip.
Oh, and regarding that const violation on line 267, I'm thinking that came about due to confusion with strrchr, which is defined, at least in MSVC, as:
char* strrchr(const char*, int);
Not sure who had that bright idea, but that's a const correctness violation waiting to happen--and in fact, one did. Anyway, I fixed it.