nickg/nvc — Issue #1: compile failure w/ -Wall -Werror
Author: hiyuh
Created: 2012-02-14 08:52:14+00:00
State: open

after removing -Werror from Makefile.am like this:

> diff --git a/src/Makefile.am b/src/Makefile.am
> index 32f8aca..1f37c82 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -3,7 +3,7 @@ SUBDIRS = rt
> bin_PROGRAMS = nvc
> noinst_LIBRARIES = libcgen.a libnvc.a
>
> -AM_CFLAGS = -Wall -Werror
> +AM_CFLAGS = -Wall
> AM_YFLAGS = -d --locations --report=all
> AM_LDFLAGS = -rdynamic $(LLVM_LDFLAGS)
>
> diff --git a/src/rt/Makefile.am b/src/rt/Makefile.am
> index 11e6c8f..cd97331 100644
> --- a/src/rt/Makefile.am
> +++ b/src/rt/Makefile.am
> @@ -1,6 +1,6 @@
> noinst_LIBRARIES = libnvc-rt.a libjit.a
>
> -AM_CFLAGS = -Wall -Werror -I$(srcdir)/..
> +AM_CFLAGS = -Wall -I$(srcdir)/..
>
> libnvc_rt_a_SOURCES = rtkern.c slave.c shell.c alloc.c vcd.c heap.c
>

I got some warning:

> rtkern.c:286:13: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
> lib.c:74:12: warning: ignoring return value of ‘realpath’, declared with attribute warn_unused_result
> util.c:55:2: warning: #warning "Don't know the IP register name for your architecture!"
> util.c:415:10: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
> util.c:409:10: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
> util.c:404:10: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
> util.c:399:10: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
> util.c:394:10: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
> util.c:389:10: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
> ident.c:137:10: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
> ident.c:138:10: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
> tree.c:1806:18: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result
> tree.c:1384:12: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result
> tree.c:1365:13: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result

the third warning "Don't know the IP register name for your architecture!" is cased by I'm on gentoo/~ppc.
others are trivial but they're useless.
could you mind to make -Werror optional?