WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] warn_unused_result fixes

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] warn_unused_result fixes
From: "Charles Coffing" <ccoffing@xxxxxxxxxx>
Date: Mon, 11 Jun 2007 18:22:43 -0400
Delivery-date: Mon, 11 Jun 2007 15:21:05 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
More fixes prompted by gcc's warn_unused_result, in the tools directory.

Note that some of the existing error checking for asprintf was wrong for Linux. 
 asprintf in glibc returns -1 on error, but leaves the pointer uninitialized.  
Only the BSDs zero out the pointer on error.

Also, while fixing these warnings I saw several error paths that were 
incorrect.  This patch minimally fixes the warn_unused_result; more complete 
error path cleanup will be a later patch.


Please apply to xen-unstable.

Signed-off-by:  Charles Coffing <ccoffing@xxxxxxxxxx>

Attachment: warn-unused-result.diff
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] warn_unused_result fixes, Charles Coffing <=