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

Re: [Xen-devel] [PATCH] tool xfrd x86-64 compilation fix.

To: Jerone Young <jyoung5@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] tool xfrd x86-64 compilation fix.
From: Anthony Liguori <aliguori@xxxxxxxxxx>
Date: Tue, 22 Mar 2005 13:05:36 -0600
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 22 Mar 2005 19:08:28 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1111517674.2106.8.camel@thinkpad>
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Organization: IBM
References: <1111517674.2106.8.camel@thinkpad>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)
size_t seems like the right type here.  Probably should be:

fwrite(data, buf_n, 1, stdout);
printf("\n");

Regards,
Anthony Liguori

Jerone Young wrote:

Fix curldebug function in xendomain.c of xfrd. Function takes argument
"size_t buf_num" and uses it as the field width to print, that has to be
an int. While size_t on 32 bit systems is 4bytes (or size of an int) it
is 8bytes on 64bit systems (not size of an int). So this function should
just use "int buf_num". This function is not used in the code anywhere.
This will fix compilation on x86-64.

Signed-off-by: Jerone Young <jyoung5@xxxxxxxxxx>

--- tools/xfrd/xen_domain.c.orig        2005-03-22 12:52:04.156581136 -0600
+++ tools/xfrd/xen_domain.c     2005-03-22 12:52:23.369660304 -0600
@@ -176,7 +176,7 @@ static CURL *curlinit(void){

/** Curl debug function.
 */
-int curldebug(CURL *curl, curl_infotype ty, char *buf, size_t buf_n,
void *data){
+int curldebug(CURL *curl, curl_infotype ty, char *buf, int buf_n, void
*data){
    printf("%*s\n", buf_n, buf);
    return 0;
}





-------------------------------------------------------
This SF.net email is sponsored by: 2005 Windows Mobile Application Contest
Submit applications for Windows Mobile(tm)-based Pocket PCs or Smartphones
for the chance to win $25,000 and application distribution. Enter today at
http://ads.osdn.com/?ad_id=6882&alloc_id=15148&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

<Prev in Thread] Current Thread [Next in Thread>