All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Bei Guan <gbtju85@gmail.com>
Cc: "Keir (Xen.org)" <keir@xen.org>, xen-devel <xen-devel@lists.xen.org>
Subject: Re: Errors of doing "make install-tools" with xen-4.2-unstable?
Date: Fri, 11 May 2012 17:24:23 +0100	[thread overview]
Message-ID: <1336753463.23818.131.camel@zakaz.uk.xensource.com> (raw)
In-Reply-To: <CAEQjb-Skpg2O8vi1fGSprHZVw0hSg_+-H83=zQGnetQz2__h_g@mail.gmail.com>

On Fri, 2012-05-11 at 17:10 +0100, Bei Guan wrote:


> No, it doesn't work for me. There is the same error.

Hrm. Since you can reproduce would you mind experimenting a bit to
figure out the correct fix for this?

Perhaps adding -Wno-unused-result to C flags helps (google suggests it
may not)?

Or maybe just assigning to a dummy variable.

Ian.

> My environment and gcc version are like this:
> 
> 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@citrix.com>
>         # 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@citrix.com>
>         
>         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();
>         
>         
> 
> 
> 
> -- 
> Best Regards,
> Bei Guan
> 

  parent reply	other threads:[~2012-05-11 16:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-11 14:08 Errors of doing "make install-tools" with xen-4.2-unstable? Bei Guan
2012-05-11 14:16 ` Ian Campbell
2012-05-11 15:12   ` Bei Guan
2012-05-11 15:47     ` Ian Campbell
2012-05-11 16:10       ` Bei Guan
2012-05-11 16:18         ` Keir Fraser
2012-05-11 16:24         ` Ian Campbell [this message]
2012-05-11 16:33           ` Bei Guan
2012-05-11 16:47             ` Keir Fraser
2012-05-11 17:01               ` Ian Jackson
2012-05-12  5:50               ` Ian Campbell
2012-05-11 16:44           ` Keir Fraser
2012-05-11 16:57             ` Bei Guan
2012-05-11 16:16   ` Keir Fraser
2012-05-11 14:19 ` Olaf Hering
2012-05-11 15:26   ` Bei Guan

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=1336753463.23818.131.camel@zakaz.uk.xensource.com \
    --to=ian.campbell@citrix.com \
    --cc=gbtju85@gmail.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xen.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.