I encountered this too when I build with ‘make’; however if I build through JIB the error didn’t occur.
Tony > On Sep 18, 2018, at 2:08 AM, Thomas Stüfe <thomas.stu...@gmail.com> wrote: > > Hi Severin, > > I get reproducable build errors with your fix on my machine (Ubuntu 16.4). > > When I build release (no special build options), I get: > > /shared/projects/openjdk/jdk-jdk/source/src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c: > In function ‘read_exec_segments’: > /shared/projects/openjdk/jdk-jdk/source/src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c:798:7: > error: ignoring return value of ‘pread’, declared with attribute > warn_unused_result [-Werror=unused-result] > pread(ph->core->exec_fd, interp_name, exec_php->p_filesz, > exec_php->p_offset); > ^ > > When I remove your change (reset opt to NONE) error goes away. I have > no idea why optimization influences warning level though. Any ideas? > > (Of course, one could just fix the warning, but I wonder if I am the > only one with this problem) > > Best Regards, Thomas > > > > On Mon, Sep 17, 2018 at 6:25 AM, Sharath Ballal > <sharath.bal...@oracle.com> wrote: >> Hi Severin, >> >> Looks good to me. >> >> >> Thanks, >> Sharath (not a Reviewer) >> >> >> -----Original Message----- >> From: Severin Gehwolf [mailto:sgehw...@redhat.com] >> Sent: Friday, September 14, 2018 7:04 PM >> To: build-dev; serviceability-dev >> Subject: RFR: 8210647: libsaproc is being compiled without optimization. >> >> Hi, >> >> Could I please get a review of this one-liner fix. It changes optimization >> of libsaproc from -O0 to -O3 (as per Magnus' suggestion). >> I've run servicability tests and haven't seen any new failures. >> Thoughts? >> >> Bug: https://bugs.openjdk.java.net/browse/JDK-8210647 >> webrev: http://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-8210647/webrev.01/ >> >> Thanks, >> Severin >> >>