Discussion:
[PATCH] configure: Use silent rules (reduced CC output)
Thomas Adam
2015-05-17 03:12:59 UTC
Permalink
As of automake-1.11, it's now possible to tell automake that the compiler
output is "hidden", producing output almost identical to compiling on
OpenBSD. The effects of this are such that this can be disabled with
'--disable-silent-rules', or 'make V=1' to enable "verbose" output.

Even with silent-rules in use, compiler warnings/errors are still shown in
the usual way.
---
configure.ac | 1 +
1 file changed, 1 insertion(+)

diff --git a/configure.ac b/configure.ac
index cccd656..13a7d27 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,6 +2,7 @@

# Miscellaneous autofoo bullshit.
AC_INIT(tmux, 2.1)
+AM_SILENT_RULES([yes])
RELEASE=2.0
AC_SUBST(RELEASE)
--
2.1.4
Suraj N. Kurapati
2015-05-17 03:35:27 UTC
Permalink
Post by Thomas Adam
+AM_SILENT_RULES([yes])
This works beautifully! gcc 4.9.2 warnings are plain to see now:

client.c: In function ‘client_dispatch_attached’:
client.c:712:4: warning: ignoring return value of ‘system’, declared
with attribute warn_unused_result [-Wunused-result] system(data);
^
cmd-display-message.c: In function ‘cmd_display_message_exec’:
cmd-display-message.c:98:2: warning: format not a string literal,
format string not checked [-Wformat-nonliteral] len = strftime(out,
sizeof out, template, localtime(&t)); ^
format.c: In function ‘format_expand_time’:
format.c:350:2: warning: format not a string literal, format string not
checked [-Wformat-nonliteral] } while (strftime(tmp, tmplen, fmt, tm)
== 0); ^
input.c: In function ‘input_reply’:
input.c:960:2: warning: ignoring return value of ‘vasprintf’, declared
with attribute warn_unused_result [-Wunused-result] vasprintf(&reply,
fmt, ap); ^
job.c: In function ‘job_run’:
job.c:70:4: warning: ignoring return value of ‘chdir’, declared with
attribute warn_unused_result [-Wunused-result] chdir("/");
^
status.c: In function ‘status_replace’:
status.c:450:2: warning: format not a string literal, format string not
checked [-Wformat-nonliteral] len = strftime(in, sizeof in, fmt,
localtime(&t)); ^
tty.c: In function ‘tty_puts’:
tty.c:416:3: warning: ignoring return value of ‘write’, declared with
attribute warn_unused_result [-Wunused-result] write(tty->log_fd, s,
strlen(s)); ^
tty.c: In function ‘tty_putc’:
tty.c:448:3: warning: ignoring return value of ‘write’, declared with
attribute warn_unused_result [-Wunused-result] write(tty->log_fd, &ch,
1); ^
tty.c: In function ‘tty_putn’:
tty.c:456:3: warning: ignoring return value of ‘write’, declared with
attribute warn_unused_result [-Wunused-result] write(tty->log_fd, buf,
len); ^
window.c: In function ‘window_pane_spawn’:
window.c:822:4: warning: ignoring return value of ‘chdir’, declared
with attribute warn_unused_result [-Wunused-result] chdir("/");
^
compat/imsg-buffer.c: In function ‘msgbuf_write’:
compat/imsg-buffer.c:258:3: warning: dereferencing type-punned pointer
will break strict-aliasing rules [-Wstrict-aliasing] *(int *)CMSG_DATA
(cmsg) = buf->fd; ^
compat/getopt.c: In function ‘BSDgetopt’:
compat/getopt.c:97:14: warning: assignment discards ‘const’ qualifier
from pointer target type BSDoptarg = place;
^
Nicholas Marriott
2015-05-17 16:27:47 UTC
Permalink
No thanks, this makes build logs much more useless.
Post by Thomas Adam
As of automake-1.11, it's now possible to tell automake that the compiler
output is "hidden", producing output almost identical to compiling on
OpenBSD. The effects of this are such that this can be disabled with
'--disable-silent-rules', or 'make V=1' to enable "verbose" output.
Even with silent-rules in use, compiler warnings/errors are still shown in
the usual way.
---
configure.ac | 1 +
1 file changed, 1 insertion(+)
diff --git a/configure.ac b/configure.ac
index cccd656..13a7d27 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,6 +2,7 @@
# Miscellaneous autofoo bullshit.
AC_INIT(tmux, 2.1)
+AM_SILENT_RULES([yes])
RELEASE=2.0
AC_SUBST(RELEASE)
--
2.1.4
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
Loading...