From bd95d6d5dbd27e2b904f7907ef39766159d0afcf Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 23 Feb 2008 10:26:52 +0100 Subject: Respect the return value of asprintf This removes tons of warnings warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result for me. Lots of that kind left though :-) (This used to be commit ba29219ea243cc217ab3522b036a82ff8dfeedc8) --- source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source4/pidl/lib/Parse') diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm index ef3eb3dbcf..a959dc84f6 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm @@ -775,8 +775,7 @@ sub ParseElementPrint($$$$) $self->pidl("for ($counter=0;$counter<$length;$counter++) {"); $self->indent; $self->pidl("char *idx_$l->{LEVEL_INDEX}=NULL;"); - $self->pidl("asprintf(&idx_$l->{LEVEL_INDEX}, \"[\%d]\", $counter);"); - $self->pidl("if (idx_$l->{LEVEL_INDEX}) {"); + $self->pidl("if (asprintf(&idx_$l->{LEVEL_INDEX}, \"[\%d]\", $counter) != -1) {"); $self->indent; $var_name = get_array_element($var_name, $counter); -- cgit