* [dpdk-dev] [PATCH] librte_vhost: Fix compilation issue @ 2014-10-29 6:39 Ouyang Changchun 2014-10-29 8:16 ` Fu, JingguoX ` (2 more replies) 0 siblings, 3 replies; 6+ messages in thread From: Ouyang Changchun @ 2014-10-29 6:39 UTC (permalink / raw) To: dev It fixes this compilation complain: "error: ignoring return value of 'realpath', declared with attribute warn_unused_result [-Werror=unused-result]" Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com> --- lib/librte_vhost/virtio-net.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c index 27ba175..8015dd8 100644 --- a/lib/librte_vhost/virtio-net.c +++ b/lib/librte_vhost/virtio-net.c @@ -133,6 +133,7 @@ host_memory_map(struct virtio_net *dev, struct virtio_memory *mem, char mapfile[PATH_MAX]; char procdir[PATH_MAX]; char resolved_path[PATH_MAX]; + char *path = NULL; FILE *fmap; void *map; uint8_t found = 0; @@ -235,9 +236,11 @@ host_memory_map(struct virtio_net *dev, struct virtio_memory *mem, while (NULL != (dptr = readdir(dp))) { snprintf(memfile, PATH_MAX, "/proc/%u/fd/%s", pid, dptr->d_name); - realpath(memfile, resolved_path); - if (resolved_path == NULL) { - RTE_LOG(ERR, VHOST_CONFIG, "(%"PRIu64") Failed to resolve fd directory\n", dev->device_fh); + path = realpath(memfile, resolved_path); + if (path == NULL) { + RTE_LOG(ERR, VHOST_CONFIG, + "(%"PRIu64") Failed to resolve fd directory\n", + dev->device_fh); closedir(dp); return -1; } -- 1.8.4.2 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] librte_vhost: Fix compilation issue 2014-10-29 6:39 [dpdk-dev] [PATCH] librte_vhost: Fix compilation issue Ouyang Changchun @ 2014-10-29 8:16 ` Fu, JingguoX 2014-10-29 8:48 ` Fu, JingguoX 2014-10-29 23:21 ` Thomas Monjalon 2 siblings, 0 replies; 6+ messages in thread From: Fu, JingguoX @ 2014-10-29 8:16 UTC (permalink / raw) To: Ouyang, Changchun, dev Patch name: librte_vhost: Fix compilation issue Brief description: to fix compilation error on ubuntu14.04 for vhost lib and example Test Flag: Tested-by Tester name: jingguox.fu@intel.com Commit ID: 1ab07743b21b785a71fa334641ab58e779532600 Result summary: total 3 cases, 3 passed, 0 failed Test Case 1: Name: compile vhost on fc20 with gcc 4.8.3 x86_64 Environment: OS: Fedora20 3.11.10-301.fc20.x86_64 GCC: gcc 4.8.3 CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb] Excepted: compilation success Test result: PASSED Test Case 2: Name: compile vhost on fc20 with icc 14.0.2 x86_64 Environment: OS: Fedora20 3.11.10-301.fc20.x86_64 ICC: icc 14.0.2 CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb] Excepted: compilation success Test result: PASSED Test Case 3: Name: compile vhost on UB14.04 with gcc 4.8.2 x86_64 Environment: OS: Ubuntu14.04 3.13.0-24-generic x86_64 GCC: gcc 4.8.2 CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb] Excepted: compilation success Test result: PASSED -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ouyang Changchun Sent: Wednesday, October 29, 2014 14:40 To: dev@dpdk.org Subject: [dpdk-dev] [PATCH] librte_vhost: Fix compilation issue It fixes this compilation complain: "error: ignoring return value of 'realpath', declared with attribute warn_unused_result [-Werror=unused-result]" Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com> --- lib/librte_vhost/virtio-net.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c index 27ba175..8015dd8 100644 --- a/lib/librte_vhost/virtio-net.c +++ b/lib/librte_vhost/virtio-net.c @@ -133,6 +133,7 @@ host_memory_map(struct virtio_net *dev, struct virtio_memory *mem, char mapfile[PATH_MAX]; char procdir[PATH_MAX]; char resolved_path[PATH_MAX]; + char *path = NULL; FILE *fmap; void *map; uint8_t found = 0; @@ -235,9 +236,11 @@ host_memory_map(struct virtio_net *dev, struct virtio_memory *mem, while (NULL != (dptr = readdir(dp))) { snprintf(memfile, PATH_MAX, "/proc/%u/fd/%s", pid, dptr->d_name); - realpath(memfile, resolved_path); - if (resolved_path == NULL) { - RTE_LOG(ERR, VHOST_CONFIG, "(%"PRIu64") Failed to resolve fd directory\n", dev->device_fh); + path = realpath(memfile, resolved_path); + if (path == NULL) { + RTE_LOG(ERR, VHOST_CONFIG, + "(%"PRIu64") Failed to resolve fd directory\n", + dev->device_fh); closedir(dp); return -1; } -- 1.8.4.2 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] librte_vhost: Fix compilation issue 2014-10-29 6:39 [dpdk-dev] [PATCH] librte_vhost: Fix compilation issue Ouyang Changchun 2014-10-29 8:16 ` Fu, JingguoX @ 2014-10-29 8:48 ` Fu, JingguoX 2014-10-29 23:07 ` Thomas Monjalon 2014-10-29 23:21 ` Thomas Monjalon 2 siblings, 1 reply; 6+ messages in thread From: Fu, JingguoX @ 2014-10-29 8:48 UTC (permalink / raw) To: Fu, JingguoX, Ouyang, Changchun, dev Sorry, not excepted, those are expected! Patch name: librte_vhost: Fix compilation issue Brief description: to fix compilation error on ubuntu14.04 for vhost lib and example Test Flag: Tested-by Tester name: jingguox.fu@intel.com Commit ID: 1ab07743b21b785a71fa334641ab58e779532600 Result summary: total 3 cases, 3 passed, 0 failed Test Case 1: Name: compile vhost on fc20 with gcc 4.8.3 x86_64 Environment: OS: Fedora20 3.11.10-301.fc20.x86_64 GCC: gcc 4.8.3 CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb] expected: compilation success Test result: PASSED Test Case 2: Name: compile vhost on fc20 with icc 14.0.2 x86_64 Environment: OS: Fedora20 3.11.10-301.fc20.x86_64 ICC: icc 14.0.2 CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb] expected: compilation success Test result: PASSED Test Case 3: Name: compile vhost on UB14.04 with gcc 4.8.2 x86_64 Environment: OS: Ubuntu14.04 3.13.0-24-generic x86_64 GCC: gcc 4.8.2 CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb] expected: compilation success Test result: PASSED -----Original Message----- From: Fu, JingguoX Sent: Wednesday, October 29, 2014 16:17 To: Ouyang, Changchun; dev@dpdk.org Cc: Cao, Waterman Subject: RE: [dpdk-dev] [PATCH] librte_vhost: Fix compilation issue Patch name: librte_vhost: Fix compilation issue Brief description: to fix compilation error on ubuntu14.04 for vhost lib and example Test Flag: Tested-by Tester name: jingguox.fu@intel.com Commit ID: 1ab07743b21b785a71fa334641ab58e779532600 Result summary: total 3 cases, 3 passed, 0 failed Test Case 1: Name: compile vhost on fc20 with gcc 4.8.3 x86_64 Environment: OS: Fedora20 3.11.10-301.fc20.x86_64 GCC: gcc 4.8.3 CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb] Excepted: compilation success Test result: PASSED Test Case 2: Name: compile vhost on fc20 with icc 14.0.2 x86_64 Environment: OS: Fedora20 3.11.10-301.fc20.x86_64 ICC: icc 14.0.2 CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb] Excepted: compilation success Test result: PASSED Test Case 3: Name: compile vhost on UB14.04 with gcc 4.8.2 x86_64 Environment: OS: Ubuntu14.04 3.13.0-24-generic x86_64 GCC: gcc 4.8.2 CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb] Excepted: compilation success Test result: PASSED -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ouyang Changchun Sent: Wednesday, October 29, 2014 14:40 To: dev@dpdk.org Subject: [dpdk-dev] [PATCH] librte_vhost: Fix compilation issue It fixes this compilation complain: "error: ignoring return value of 'realpath', declared with attribute warn_unused_result [-Werror=unused-result]" Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com> --- lib/librte_vhost/virtio-net.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c index 27ba175..8015dd8 100644 --- a/lib/librte_vhost/virtio-net.c +++ b/lib/librte_vhost/virtio-net.c @@ -133,6 +133,7 @@ host_memory_map(struct virtio_net *dev, struct virtio_memory *mem, char mapfile[PATH_MAX]; char procdir[PATH_MAX]; char resolved_path[PATH_MAX]; + char *path = NULL; FILE *fmap; void *map; uint8_t found = 0; @@ -235,9 +236,11 @@ host_memory_map(struct virtio_net *dev, struct virtio_memory *mem, while (NULL != (dptr = readdir(dp))) { snprintf(memfile, PATH_MAX, "/proc/%u/fd/%s", pid, dptr->d_name); - realpath(memfile, resolved_path); - if (resolved_path == NULL) { - RTE_LOG(ERR, VHOST_CONFIG, "(%"PRIu64") Failed to resolve fd directory\n", dev->device_fh); + path = realpath(memfile, resolved_path); + if (path == NULL) { + RTE_LOG(ERR, VHOST_CONFIG, + "(%"PRIu64") Failed to resolve fd directory\n", + dev->device_fh); closedir(dp); return -1; } -- 1.8.4.2 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] librte_vhost: Fix compilation issue 2014-10-29 8:48 ` Fu, JingguoX @ 2014-10-29 23:07 ` Thomas Monjalon 0 siblings, 0 replies; 6+ messages in thread From: Thomas Monjalon @ 2014-10-29 23:07 UTC (permalink / raw) To: Fu, JingguoX; +Cc: dev Please check with Yong Liu for the template of test report. We discussed it together. Thanks 2014-10-29 08:48, Fu, JingguoX: > Sorry, not excepted, those are expected! > > Patch name: librte_vhost: Fix compilation issue > Brief description: to fix compilation error on ubuntu14.04 for vhost lib and example > Test Flag: Tested-by > Tester name: jingguox.fu@intel.com > Commit ID: 1ab07743b21b785a71fa334641ab58e779532600 > Result summary: total 3 cases, 3 passed, 0 failed > > Test Case 1: > Name: compile vhost on fc20 with gcc 4.8.3 x86_64 > Environment: OS: Fedora20 3.11.10-301.fc20.x86_64 > GCC: gcc 4.8.3 > CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz > NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb] > expected: compilation success > Test result: PASSED > > Test Case 2: > Name: compile vhost on fc20 with icc 14.0.2 x86_64 > Environment: OS: Fedora20 3.11.10-301.fc20.x86_64 > ICC: icc 14.0.2 > CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz > NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb] > expected: compilation success > Test result: PASSED > > Test Case 3: > Name: compile vhost on UB14.04 with gcc 4.8.2 x86_64 > Environment: OS: Ubuntu14.04 3.13.0-24-generic x86_64 > GCC: gcc 4.8.2 > CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz > NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb] > expected: compilation success > Test result: PASSED > > -----Original Message----- > From: Fu, JingguoX > Sent: Wednesday, October 29, 2014 16:17 > To: Ouyang, Changchun; dev@dpdk.org > Cc: Cao, Waterman > Subject: RE: [dpdk-dev] [PATCH] librte_vhost: Fix compilation issue > > Patch name: librte_vhost: Fix compilation issue > Brief description: to fix compilation error on ubuntu14.04 for vhost lib and example > Test Flag: Tested-by > Tester name: jingguox.fu@intel.com > Commit ID: 1ab07743b21b785a71fa334641ab58e779532600 > Result summary: total 3 cases, 3 passed, 0 failed > > Test Case 1: > Name: compile vhost on fc20 with gcc 4.8.3 x86_64 > Environment: OS: Fedora20 3.11.10-301.fc20.x86_64 > GCC: gcc 4.8.3 > CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz > NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb] > Excepted: compilation success > Test result: PASSED > > Test Case 2: > Name: compile vhost on fc20 with icc 14.0.2 x86_64 > Environment: OS: Fedora20 3.11.10-301.fc20.x86_64 > ICC: icc 14.0.2 > CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz > NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb] > Excepted: compilation success > Test result: PASSED > > Test Case 3: > Name: compile vhost on UB14.04 with gcc 4.8.2 x86_64 > Environment: OS: Ubuntu14.04 3.13.0-24-generic x86_64 > GCC: gcc 4.8.2 > CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz > NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb] > Excepted: compilation success > Test result: PASSED > > > > > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ouyang Changchun > Sent: Wednesday, October 29, 2014 14:40 > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH] librte_vhost: Fix compilation issue > > It fixes this compilation complain: "error: ignoring return value of 'realpath', > declared with attribute warn_unused_result [-Werror=unused-result]" > > Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com> > --- > lib/librte_vhost/virtio-net.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c > index 27ba175..8015dd8 100644 > --- a/lib/librte_vhost/virtio-net.c > +++ b/lib/librte_vhost/virtio-net.c > @@ -133,6 +133,7 @@ host_memory_map(struct virtio_net *dev, struct virtio_memory *mem, > char mapfile[PATH_MAX]; > char procdir[PATH_MAX]; > char resolved_path[PATH_MAX]; > + char *path = NULL; > FILE *fmap; > void *map; > uint8_t found = 0; > @@ -235,9 +236,11 @@ host_memory_map(struct virtio_net *dev, struct virtio_memory *mem, > while (NULL != (dptr = readdir(dp))) { > snprintf(memfile, PATH_MAX, "/proc/%u/fd/%s", > pid, dptr->d_name); > - realpath(memfile, resolved_path); > - if (resolved_path == NULL) { > - RTE_LOG(ERR, VHOST_CONFIG, "(%"PRIu64") Failed to resolve fd directory\n", dev->device_fh); > + path = realpath(memfile, resolved_path); > + if (path == NULL) { > + RTE_LOG(ERR, VHOST_CONFIG, > + "(%"PRIu64") Failed to resolve fd directory\n", > + dev->device_fh); > closedir(dp); > return -1; > } > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] librte_vhost: Fix compilation issue 2014-10-29 6:39 [dpdk-dev] [PATCH] librte_vhost: Fix compilation issue Ouyang Changchun 2014-10-29 8:16 ` Fu, JingguoX 2014-10-29 8:48 ` Fu, JingguoX @ 2014-10-29 23:21 ` Thomas Monjalon 2014-10-30 0:33 ` Ouyang, Changchun 2 siblings, 1 reply; 6+ messages in thread From: Thomas Monjalon @ 2014-10-29 23:21 UTC (permalink / raw) To: Ouyang Changchun; +Cc: dev 2014-10-29 14:39, Ouyang Changchun: > It fixes this compilation complain: "error: ignoring return value of 'realpath', > declared with attribute warn_unused_result [-Werror=unused-result]" > > Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com> Applied Curiosity: how did you see this issue? Thanks -- Thomas ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] librte_vhost: Fix compilation issue 2014-10-29 23:21 ` Thomas Monjalon @ 2014-10-30 0:33 ` Ouyang, Changchun 0 siblings, 0 replies; 6+ messages in thread From: Ouyang, Changchun @ 2014-10-30 0:33 UTC (permalink / raw) To: Thomas Monjalon; +Cc: dev Hi Thomas, Thanks for applying it. This issue is reported by a customer. We can reproduce it in Ubuntu14, on that environment, gcc will check any unused result of function. Thanks and regards, Changchun -----Original Message----- From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] Sent: Thursday, October 30, 2014 7:21 AM To: Ouyang, Changchun Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] librte_vhost: Fix compilation issue 2014-10-29 14:39, Ouyang Changchun: > It fixes this compilation complain: "error: ignoring return value of > 'realpath', declared with attribute warn_unused_result [-Werror=unused-result]" > > Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com> Applied Curiosity: how did you see this issue? Thanks -- Thomas ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-10-30 0:27 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2014-10-29 6:39 [dpdk-dev] [PATCH] librte_vhost: Fix compilation issue Ouyang Changchun 2014-10-29 8:16 ` Fu, JingguoX 2014-10-29 8:48 ` Fu, JingguoX 2014-10-29 23:07 ` Thomas Monjalon 2014-10-29 23:21 ` Thomas Monjalon 2014-10-30 0:33 ` Ouyang, Changchun
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).