bugGPSD - Bugs: bug #40785, build failure: 'const struct...

 
 

bug #40785: build failure: 'const struct gps_type_t' has no member named 'mode_switcher'

Submitter:  Vicente Olivert Riera <vriera>
Submitted:  Tue 03 Dec 2013 12:34:18 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 05 Dec 2013 09:59:44 PM UTC, comment #2: 

Thould be fixed in the repository head version.

Eric S. Raymond <esr>
Group administrator
Tue 03 Dec 2013 12:58:41 PM UTC, comment #1: 

Another thing I don't understand is, why it doesn't fail to compile on MIPS32? I tested it and RECONFIGURE_ENABLE is not defined, so, the device_type struct should not have the mode_switcher member. Then, why it doesn't fail when session->device_type->mode_switcher is accessed on libgpsd_core.c, line #1236?

Vicente Olivert Riera <vriera>
Tue 03 Dec 2013 12:34:18 PM UTC, original submission:  

It fails to compile on some arches, for instance x86, x86_64 and MIPS64. And compiles fine on MIPS32 for instance.

I have used 'reconfigure=no' on all of them.

This is the error:

libgpsd_core.c: In function 'gpsd_poll':
libgpsd_core.c:1236:35: error: 'const struct gps_type_t' has no member named 'mode_switcher'
scons: * [libgpsd_core.os] Error 1
scons: building terminated because of errors.

In the file libgpsd_core.c, line #1236, it tries to access to session->device_type->mode_switcher. That memeber of device_type struct doesn't exists because in the file gpsd.h, line #651, it start to create 3 members of the struct only if RECONFIGURE_ENABLE is defined.
So, in the libgpsd_core.c, line #1236, the access to session->device_type->mode_switcher should be protected inside a block like this one:

#ifdef RECONFIGURE_ENABLE

<protected block>

#endif /* RECONFIGURE_ENABLE */

I don't know where the "protected block" should starts.

Vicente Olivert Riera <vriera>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by esr (Posted a comment)
  • -email is unavailable- added by vriera (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-08-23 esr Open/ClosedOpen Closed
    2013-12-05 esr StatusNone Fixed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code