All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Leonard <talex5@gmail.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>,
	Anil Madhavapeddy <anil@recoil.org>,
	David Scott <Dave.Scott@eu.citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH] mini-os: enable compiler check for printk format types
Date: Wed, 8 Oct 2014 12:12:30 +0100	[thread overview]
Message-ID: <CAG4opy_r9OmDf0kLAMpjey51aakZi5kP+27Bs2=r1gVmRQsnYg@mail.gmail.com> (raw)
In-Reply-To: <1412602130.14255.8.camel@citrix.com>

On 6 October 2014 14:28, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> On Sun, 2014-10-05 at 21:30 +0200, Samuel Thibault wrote:
>
>> > Samuel, are you ok with the patch after those clarifications?
>>
>> Yes.
>
> I interpreted this as an Acked-by, I hope that's ok, and was about to
> commit when:
> disk_read.c: In function 'vtpm_load_disk':
> disk_read.c:539:59: error: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'unsigned int' [-Werror=format]
> disk_read.c:539:59: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'unsigned int' [-Werror=format]
> disk_read.c:540:2: error: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'unsigned int' [-Werror=format]
> disk_read.c:540:2: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Werror=format]
> disk_read.c:542:30: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'unsigned int' [-Werror=format]
> disk_read.c:545:47: error: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'unsigned int' [-Werror=format]
> disk_read.c:545:47: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Werror=format]
> disk_read.c:545:47: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'unsigned int' [-Werror=format]
> disk_read.c:545:47: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'unsigned int' [-Werror=format]
> disk_read.c:548:21: error: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'unsigned int' [-Werror=format]
> disk_read.c:548:21: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'unsigned int' [-Werror=format]
> disk_read.c:548:21: error: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'unsigned int' [-Werror=format]
> disk_read.c:551:21: error: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'unsigned int' [-Werror=format]
> disk_read.c:551:21: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Werror=format]
> disk_read.c:551:21: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'unsigned int' [-Werror=format]
>
> That's on an x86_32 stubdom build.

What's the exact command I should use to test the builds? I did a
"make build" in "stubdom" in an x86_32 container and it worked*, but I
now see that doing "make" in the "stubdom/vtpmmgr" subdirectory gives
the above error.

* (after adding some symlinks to fix "xen-config-host.h:19:21: fatal
error: xenctrl.h: No such file or directory" error in "ioemu")

On 7 October 2014 17:04, Samuel Thibault <samuel.thibault@ens-lyon.org> wrote:
> Ian Campbell, le Mon 06 Oct 2014 14:28:50 +0100, a écrit :
>> Looks like this is printing the output of sizeof. The correct modifier
>> for printing a size_t is %zu not hardcoded as a long. I haven't checked
>> if mini-os printf supports z.
>
> Yes it does, so it can be used.

It will also warn about a %lu that should be just %u in there.
With those changes, vtpmmgr builds for me.


-- 
Dr Thomas Leonard        http://0install.net/
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1
GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  parent reply	other threads:[~2014-10-08 11:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-06  9:44 [PATCH] mini-os: enable compiler check for printk format types Thomas Leonard
2014-08-06 16:29 ` Andrew Cooper
2014-08-07  6:33   ` Jan Beulich
2014-08-07 14:55 ` Samuel Thibault
2014-08-08  8:50   ` Thomas Leonard
2014-08-08 14:28   ` Thomas Leonard
2014-08-08 14:32     ` Samuel Thibault
2014-10-03  8:44       ` Thomas Leonard
2014-10-03  8:55         ` Ian Campbell
2014-10-05 19:30           ` Samuel Thibault
2014-10-06 13:28             ` Ian Campbell
2014-10-07 16:04               ` Samuel Thibault
2014-10-08 11:12               ` Thomas Leonard [this message]
2014-10-08 11:16                 ` Andrew Cooper
2014-10-08 11:25                 ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAG4opy_r9OmDf0kLAMpjey51aakZi5kP+27Bs2=r1gVmRQsnYg@mail.gmail.com' \
    --to=talex5@gmail.com \
    --cc=Dave.Scott@eu.citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=anil@recoil.org \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.