[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Errors of doing "make install-tools" with xen-4.2-unstable?


  • To: Bei Guan <gbtju85@xxxxxxxxx>, Ian Campbell <Ian.Campbell@xxxxxxxxxx>
  • From: Keir Fraser <keir.xen@xxxxxxxxx>
  • Date: Fri, 11 May 2012 17:18:13 +0100
  • Cc: xen-devel <xen-devel@xxxxxxxxxxxxx>
  • Delivery-date: Fri, 11 May 2012 16:18:31 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: Ac0vkanZ08+Wb0u9d0+2LCshBJFncA==
  • Thread-topic: [Xen-devel] Errors of doing "make install-tools" with xen-4.2-unstable?

On 11/05/2012 17:10, "Bei Guan" <gbtju85@xxxxxxxxx> wrote:

> 2012/5/11 Ian Campbell <Ian.Campbell@xxxxxxxxxx>
>> On Fri, 2012-05-11 at 16:12 +0100, Bei Guan wrote:
>>> 
>>> 2012/5/11 Ian Campbell <Ian.Campbell@xxxxxxxxxx>

>>> 
>>> Thank you for your reply. I have used "hg pull; hg update" to update
>>> to the latest Xen and it is the version info:
>>> 
>>> root@gavin-desktop:~/Xen/xen-4.2-unstable# hg tip
>>> changeset:   25287:54c8c9eaee92
>>> tag:         tip
>>> user:        Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxx>
>>> date:        Fri Apr 27 11:09:26 2012 +0200
>>> summary:     docs: add vpmu description to xen-command-line.markdown
>>> 
>>> But, it still has the same errors.
>> 
>> Thanks, looks like we still need to fix these errors then.
>> 
>> I'm not really happy with the following, but it's no worse than things
>> are today...
>> 
>> Bei, I don't see these build failures, does this work for you?
> 
> No, it doesn't work for me. There is the same error.
> My environment and gcc version are like this:

I think the problem is that casting the function result to void doesn't work
around this warning. You actually have to do something with the return code.
:-(

 -- Keir

> root@gavin-desktop:~# uname -a
> Linux gavin-desktop 2.6.32-5-xen-amd64 #1 SMP Thu May 19 01:16:47 UTC 2011
> x86_64 GNU/Linux
> 
> root@gavin-desktop:~# gcc -v
> Using built-in specs.
> Target: x86_64-linux-gnu
> Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5'
> --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
> --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
> --enable-multiarch --enable-linker-build-id --with-system-zlib
> --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
> --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls
> --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc
> --disable-werror --with-arch-32=i486 --with-tune=generic
> --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
> --target=x86_64-linux-gnu
> Thread model: posix
> gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
> 
> 
> 
> 
> Thanks,
> Bei Guan
> 
> 
> 
>  
>> 
>> 8<------------------------------------------------------
>> 
>> # HG changeset patch
>> # User Ian Campbell <ian.campbell@xxxxxxxxxx>
>> # Date 1336751175 -3600
>> # Node ID 15ed8f45c4e57a1e206af020e0ff17b792108e99
>> # Parent  adc74e492edfee6cf44e433e3e93743a3cf71999
>> blktap: avoid attribute warn_unused_result build failures.
>> 
>> I'm not proud of this, but since none of these callers of read/write have any
>> other error handling and return void themselves (for several links up the
>> call
>> chain AFAICT) and because I don't really want to get into a massive reworking
>> of blktap2 I suppose it is at least pragmatic
>> 
>> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
>> 
>> diff -r adc74e492edf -r 15ed8f45c4e5 tools/blktap2/drivers/tapdisk-log.c
>> --- a/tools/blktap2/drivers/tapdisk-log.c       Fri May 11 16:19:16 2012
>> +0100
>> +++ b/tools/blktap2/drivers/tapdisk-log.c       Fri May 11 16:46:15 2012
>> +0100
>> @@ -247,7 +247,7 @@ tlog_flush(void)
>>         wsize = ((size + 511) & (~511));
>> 
>>         memset(tapdisk_log.buf + size, '\n', wsize - size);
>> -       write(fd, tapdisk_log.buf, wsize);
>> +       (void)write(fd, tapdisk_log.buf, wsize);
>> 
>>         tapdisk_log.p = tapdisk_log.buf;
>> 
>> diff -r adc74e492edf -r 15ed8f45c4e5 tools/blktap2/drivers/tapdisk-queue.c
>> --- a/tools/blktap2/drivers/tapdisk-queue.c     Fri May 11 16:19:16 2012
>> +0100
>> +++ b/tools/blktap2/drivers/tapdisk-queue.c     Fri May 11 16:46:15 2012
>> +0100
>> @@ -435,7 +435,7 @@ tapdisk_lio_ack_event(struct tqueue *que
>>         uint64_t val;
>> 
>>         if (lio->flags & LIO_FLAG_EVENTFD)
>> -               read(lio->event_fd, &val, sizeof(val));
>> +               (void)read(lio->event_fd, &val, sizeof(val));
>>  }
>> 
>>  static void
>> diff -r adc74e492edf -r 15ed8f45c4e5 tools/blktap2/drivers/tapdisk-stream.c
>> --- a/tools/blktap2/drivers/tapdisk-stream.c    Fri May 11 16:19:16 2012
>> +0100
>> +++ b/tools/blktap2/drivers/tapdisk-stream.c    Fri May 11 16:46:15 2012
>> +0100
>> @@ -145,7 +145,7 @@ tapdisk_stream_poll_clear(struct tapdisk
>>  {
>>         int dummy;
>> 
>> -       read(p->pipe[POLL_READ], &dummy, sizeof(dummy));
>> +       (void)read(p->pipe[POLL_READ], &dummy, sizeof(dummy));
>>         p->set = 0;
>>  }
>> 
>> @@ -155,7 +155,7 @@ tapdisk_stream_poll_set(struct tapdisk_s
>>         int dummy = 0;
>> 
>>         if (!p->set) {
>> -               write(p->pipe[POLL_WRITE], &dummy, sizeof(dummy));
>> +               (void)write(p->pipe[POLL_WRITE], &dummy, sizeof(dummy));
>>                 p->set = 1;
>>         }
>>  }
>> @@ -203,7 +203,7 @@ tapdisk_stream_print_request(struct tapd
>>  {
>>         unsigned long idx = (unsigned long)tapdisk_stream_request_idx(s,
>> sreq);
>>         char *buf = (char *)MMAP_VADDR(s->vbd->ring.vstart, idx, 0);
>> -       write(s->out_fd, buf, sreq->secs << SECTOR_SHIFT);
>> +       (void)write(s->out_fd, buf, sreq->secs << SECTOR_SHIFT);
>>  }
>> 
>>  static void
>> diff -r adc74e492edf -r 15ed8f45c4e5 tools/blktap2/drivers/tapdisk2.c
>> --- a/tools/blktap2/drivers/tapdisk2.c  Fri May 11 16:19:16 2012 +0100
>> +++ b/tools/blktap2/drivers/tapdisk2.c  Fri May 11 16:46:15 2012 +0100
>> @@ -79,7 +79,12 @@ main(int argc, char *argv[])
>>         if (optind != argc)
>>                 usage(argv[0], EINVAL);
>> 
>> -       chdir("/");
>> +       if (chdir("/")) {
>> +               DPRINTF("failed to chdir(/): %d\n", errno);
>> +               err = 1;
>> +               goto out;
>> +       }
>> +
>>         tapdisk_start_logging("tapdisk2");
>> 
>>         err = tapdisk_server_init();
>> 
>> 
> 
> 



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.