nsf / termbox

Library for writing text-based user interfaces
http://code.google.com/p/termbox
MIT License
1.97k stars 188 forks source link

Cleanup some invalid conversion errors #25

Closed joshgarnett closed 10 years ago

joshgarnett commented 10 years ago

Running with flags -g -O2 -Wall -Wextra a number of invalid conversion errors cropped up. The changes in this pull request fix the errors.

rofl0r commented 10 years ago

that's only invalid if you use a C++ compiler to compile C code.

nsf commented 10 years ago

Yep, but I guess providing some level of compatibility won't hurt anyone. On the other hand I don't really remember any C projects which do that. Probably won't apply it.

nsf commented 10 years ago

Oh well and wscript contains conf.env.append_unique('CFLAGS', ['-std=gnu99', '-Wall', '-Wextra']), so it's always compiled with -Wall and -Wextra.

nsf commented 10 years ago

Not to mention very ugly way of writing conversions with a space between the type and the expression. :D Sorry, but no. Not because it's ugly, but because it's a C++ issue, it's not valid for C programs. You can compile termbox as C and use that object file from C++, as far as I remember header file has the needed ifdefs for extern "C".