nim-lang / c2nim

c2nim is a tool to translate Ansi C code to Nim. The output is human-readable Nim code that is meant to be tweaked by hand before and after the translation process.
MIT License
509 stars 63 forks source link

Warnings #194

Closed cdunn2001 closed 4 years ago

cdunn2001 commented 4 years ago

Fixed not all, but some warnings.

cdunn2001 commented 4 years ago

I wanted to add this to nim.cfg, but these are unknown to older nim compilers.

--warning[UnusedImport]:off
--warning[InheritFromException]:off
--warning[Deprecated]:off
Araq commented 4 years ago

You can use something like

@if nimHasWarningUnusedImport:
--warning[UnusedImport]:off
@end

But I prefer to fix c2nim so that it compiles without warnings.

cdunn2001 commented 4 years ago

But I prefer to fix c2nim so that it compiles without warnings.

Then merging this would be a good start.

It's difficult to fix all the warnings because the current tests require c2nim to compile for 0.9.14, 0.20, and latest. It might be better to tag a warning-free c2nim release for each nim release.