[prev in list] [next in list] [prev in thread] [next in thread]
List: gpsd-dev
Subject: Re: [gpsd-dev] [PATCH] Be more explicit about the return value from gps_close() is not used.
From: "Gary E. Miller" <gem () rellim ! com>
Date: 2016-08-03 0:10:24
Message-ID: 20160802171024.0d705de9 () spidey ! rellim ! com
[Download RAW message or body]
Yo Robert!
Patch applied.
In general I'm a fan of checking EVERY return value. So I would hope
you would go one step further and output a warning/error when gps_close()
fails.
The squeaky wheel gets the grease and error messages squeak.
On Sat, 30 Jul 2016 18:09:01 +0000
Robert Norris <rw_norris@hotmail.com> wrote:
> ---
> libgpsmm.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libgpsmm.cpp b/libgpsmm.cpp
> index a12d975..ba4aeb0 100644
> --- a/libgpsmm.cpp
> +++ b/libgpsmm.cpp
> @@ -91,7 +91,7 @@ bool gpsmm::is_open(void)
> gpsmm::~gpsmm()
> {
> if ( to_user != NULL ) {
> - gps_close(gps_state());
> + (void)gps_close(gps_state());
> delete to_user;
> }
> }
RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
gem@rellim.com Tel:+1 541 382 8588
[Attachment #3 (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic