else
{
if (change.m_expr)
- pp_printf (&pp, "%qE is NULL",
- change.m_expr);
+ {
+ if (zerop (change.m_expr))
+ pp_printf (&pp, "using NULL here");
+ else
+ pp_printf (&pp, "%qE is NULL",
+ change.m_expr);
+ }
else
pp_printf (&pp, "%qs is NULL",
"<unknown>");
static int *__attribute__((noinline))
callee (void)
{
- return NULL;
+ return NULL; /* { dg-message "using NULL here" } */
}
void test_1 (void)
static inline struct connection *objt_conn(enum obj_type *t)
{
if (!t || *t != OBJ_TYPE_CONN)
- return (struct connection *) ((void *)0);
+ return (struct connection *) ((void *)0); /* { dg-message "using NULL here" } */
return __objt_conn(t);
}
struct session {
SSL *ssl;
struct connection *conn;
- conn = objt_conn(smp->sess->origin);
+ conn = objt_conn(smp->sess->origin); /* { dg-message "return of NULL" } */
ssl = ssl_sock_get_ssl_object(conn);
if (!ssl)
return 0;
for(i=0; i<LIST_NUM(wu->Contexts); i++)
{
- STRMAP_ENTRY *entry = (STRMAP_ENTRY*)LIST_DATA(wu->Contexts, i);
+ STRMAP_ENTRY *entry = (STRMAP_ENTRY*)LIST_DATA(wu->Contexts, i); /* { dg-message "'entry' is NULL" } */
WU_CONTEXT *context = (WU_CONTEXT*)entry->Value; /* { dg-bogus "dereference of NULL 'entry'" "PR analyzer/108400" { xfail *-*-* } } */
if(context->ExpireDate < Tick64())
{
{
base_obj *obj = (base_obj *)malloc (sz);
if (!obj)
- return NULL;
+ return NULL; /* { dg-message "using NULL here" } */
obj->ob_type = ob_type;
obj->ob_refcnt = 1;
return obj;
{
base_obj *obj = (base_obj *)malloc (sz);
if (!obj)
- return NULL;
+ return NULL; /* { dg-message "using NULL here" } */
obj->ob_type = ob_type;
obj->ob_refcnt = 1;
return obj;
{
base_obj *obj = (base_obj *)malloc (sz);
if (!obj)
- return NULL;
+ return NULL; /* { dg-message "using NULL here" } */
obj->ob_type = ob_type;
obj->ob_refcnt = 1;
return obj;
void
wd (void)
{
- tz = 0;
+ tz = 0; /* { dg-message "using NULL here" } */
ky (*tz); /* { dg-warning "dereference of NULL" } */
}