* [PATCH] lib: rename die_if_error to error_happened
@ 2013-05-21 16:49 Jonathan Neuschäfer
2013-05-22 6:49 ` Pekka Enberg
0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Neuschäfer @ 2013-05-21 16:49 UTC (permalink / raw)
To: linux-sparse
Cc: Jonathan Neuschäfer, Christopher Li, Pekka Enberg, Xi Wang
The variable in question is set when an error message is output,
and doesn't control termination at all, so I think the new name
matches the semantics better.
Cc: Christopher Li <sparse@chrisli.org>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
---
Updated version: rebase on Xi's patch "sparse, llvm: die if error".
---
lib.c | 4 ++--
lib.h | 2 +-
sparse-llvm.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib.c b/lib.c
index 7e822eb..4ed08e0 100644
--- a/lib.c
+++ b/lib.c
@@ -30,7 +30,7 @@
#include "version.h"
int verbose, optimize, optimize_size, preprocessing;
-int die_if_error = 0;
+int error_happened = 0;
#ifndef __GNUC__
# define __GNUC__ 2
@@ -132,7 +132,7 @@ void warning(struct position pos, const char * fmt, ...)
static void do_error(struct position pos, const char * fmt, va_list args)
{
static int errors = 0;
- die_if_error = 1;
+ error_happened = 1;
show_info = 1;
/* Shut up warnings after an error */
max_warnings = 0;
diff --git a/lib.h b/lib.h
index 5ab2bd9..67c6465 100644
--- a/lib.h
+++ b/lib.h
@@ -25,7 +25,7 @@
#endif
extern int verbose, optimize, optimize_size, preprocessing;
-extern int die_if_error;
+extern int error_happened;
extern int repeat_phase, merge_phi_sources;
extern int gcc_major, gcc_minor, gcc_patchlevel;
diff --git a/sparse-llvm.c b/sparse-llvm.c
index 7219290..6ab12ff 100644
--- a/sparse-llvm.c
+++ b/sparse-llvm.c
@@ -1147,7 +1147,7 @@ int main(int argc, char **argv)
dbg_dead = 1;
FOR_EACH_PTR_NOTAG(filelist, file) {
symlist = sparse(file);
- if (die_if_error)
+ if (error_happened)
return 1;
compile(module, symlist);
} END_FOR_EACH_PTR_NOTAG(file);
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] lib: rename die_if_error to error_happened
2013-05-21 16:49 [PATCH] lib: rename die_if_error to error_happened Jonathan Neuschäfer
@ 2013-05-22 6:49 ` Pekka Enberg
0 siblings, 0 replies; 2+ messages in thread
From: Pekka Enberg @ 2013-05-22 6:49 UTC (permalink / raw)
To: Jonathan Neuschäfer; +Cc: Sparse Mailing-list, Christopher Li, Xi Wang
On Tue, May 21, 2013 at 7:49 PM, Jonathan Neuschäfer
<j.neuschaefer@gmx.net> wrote:
> The variable in question is set when an error message is output,
> and doesn't control termination at all, so I think the new name
> matches the semantics better.
>
> Cc: Christopher Li <sparse@chrisli.org>
> Cc: Pekka Enberg <penberg@kernel.org>
> Cc: Xi Wang <xi.wang@gmail.com>
> Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Chris, are you OK with me picking this up in the sparse-llvm tree?
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-22 6:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-21 16:49 [PATCH] lib: rename die_if_error to error_happened Jonathan Neuschäfer
2013-05-22 6:49 ` Pekka Enberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).