linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] remove warning "call with no type"
@ 2018-01-31 10:40 Luc Van Oostenryck
  2018-02-10 19:00 ` Christopher Li
  0 siblings, 1 reply; 3+ messages in thread
From: Luc Van Oostenryck @ 2018-01-31 10:40 UTC (permalink / raw)
  To: linux-sparse; +Cc: Luc Van Oostenryck

This warning is issued when trying to linearize a call
expressions with a null expr->ctype but such null ctype
is a consequence of an error detected during evaluation
and this error must already have issued a warning or an
error message specific to the problem.

In short, this "call with no type" is non-informative
and redundant, so avoid usless noise and remove this
warning.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 linearize.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/linearize.c b/linearize.c
index 898acac88..739fc7c07 100644
--- a/linearize.c
+++ b/linearize.c
@@ -1273,10 +1273,8 @@ static pseudo_t linearize_call_expression(struct entrypoint *ep, struct expressi
 	struct symbol *fntype;
 	struct context *context;
 
-	if (!expr->ctype) {
-		warning(expr->pos, "call with no type!");
+	if (!expr->ctype)
 		return VOID;
-	}
 
 	fn = expr->fn;
 	fntype = fn->ctype;
-- 
2.16.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] remove warning "call with no type"
  2018-01-31 10:40 [PATCH] remove warning "call with no type" Luc Van Oostenryck
@ 2018-02-10 19:00 ` Christopher Li
  2018-02-10 19:54   ` Luc Van Oostenryck
  0 siblings, 1 reply; 3+ messages in thread
From: Christopher Li @ 2018-02-10 19:00 UTC (permalink / raw)
  To: Luc Van Oostenryck; +Cc: Linux-Sparse

On Wed, Jan 31, 2018 at 2:40 AM, Luc Van Oostenryck
<luc.vanoostenryck@gmail.com> wrote:
> This warning is issued when trying to linearize a call
> expressions with a null expr->ctype but such null ctype
> is a consequence of an error detected during evaluation
> and this error must already have issued a warning or an
> error message specific to the problem.
>
> In short, this "call with no type" is non-informative
> and redundant, so avoid usless noise and remove this
> warning.

The change looks fine to me. This the change assume the
expr->ctype be NULL is result of an error and has been reported
before. I am sure that assumption holds for most of the cases. Not
sure it holds for all corner cases. On the other hand, if the expr->ctype
is NULL, it is already screwed, change it to VOID is not too bad.

Chris

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] remove warning "call with no type"
  2018-02-10 19:00 ` Christopher Li
@ 2018-02-10 19:54   ` Luc Van Oostenryck
  0 siblings, 0 replies; 3+ messages in thread
From: Luc Van Oostenryck @ 2018-02-10 19:54 UTC (permalink / raw)
  To: Christopher Li; +Cc: Linux-Sparse

On Sat, Feb 10, 2018 at 11:00:26AM -0800, Christopher Li wrote:
> On Wed, Jan 31, 2018 at 2:40 AM, Luc Van Oostenryck
> <luc.vanoostenryck@gmail.com> wrote:
> > This warning is issued when trying to linearize a call
> > expressions with a null expr->ctype but such null ctype
> > is a consequence of an error detected during evaluation
> > and this error must already have issued a warning or an
> > error message specific to the problem.
> >
> > In short, this "call with no type" is non-informative
> > and redundant, so avoid usless noise and remove this
> > warning.
> 
> The change looks fine to me. This the change assume the
> expr->ctype be NULL is result of an error and has been reported
> before. I am sure that assumption holds for most of the cases. Not
> sure it holds for all corner cases.

I consider that if it this not the case, it's a bug which
will need to be fixed by adding the proper error reporting.
But I haven't yet seen such case.

-- Luc

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-10 19:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-31 10:40 [PATCH] remove warning "call with no type" Luc Van Oostenryck
2018-02-10 19:00 ` Christopher Li
2018-02-10 19:54   ` Luc Van Oostenryck

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).