diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-03-01 14:39:38 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-03-01 14:39:38 -0500 |
commit | 9ecdda049cde08aef45ace790c3b1d62994e8dfa (patch) | |
tree | cc41130145fa24ccc020cd8e26297a22b8e6c71b | |
parent | d34e53143a87920cbe8e67926f288faac08df951 (diff) | |
download | gpsd-9ecdda049cde08aef45ace790c3b1d62994e8dfa.tar.gz |
Tell the compiler that gos_errstr() ia an observer.
All regression tests pass. Patch due to Jon Schlueter.
-rw-r--r-- | gps.h | 2 | ||||
-rw-r--r-- | libgps.xml | 2 | ||||
-rw-r--r-- | libgps_core.c | 2 |
3 files changed, 3 insertions, 3 deletions
@@ -1427,7 +1427,7 @@ extern int gps_send(struct gps_data_t *, const char *, ... ); extern int gps_read(/*@out@*/struct gps_data_t *); extern bool gps_waiting(struct gps_data_t *); extern int gps_stream(struct gps_data_t *, unsigned int, /*@null@*/void *); -extern char /*@observer@*/ *gps_errstr(const int); +extern const char /*@observer@*/ *gps_errstr(const int); /* this only needs to be visible for the unit tests */ extern int gps_unpack(char *, struct gps_data_t *); @@ -56,7 +56,7 @@ C: <paramdef>void *<parameter>data</parameter></paramdef> </funcprototype> <funcprototype> -<funcdef>char *<function>gps_errstr</function></funcdef> +<funcdef>const char *<function>gps_errstr</function></funcdef> <paramdef>int <parameter>err</parameter></paramdef> </funcprototype> <funcsynopsisinfo> diff --git a/libgps_core.c b/libgps_core.c index 3cb523f3..8a95f409 100644 --- a/libgps_core.c +++ b/libgps_core.c @@ -698,7 +698,7 @@ int gps_stream(struct gps_data_t *gpsdata, unsigned int flags, } } -extern char /*@observer@*/ *gps_errstr(const int err) +extern const char /*@observer@*/ *gps_errstr(const int err) { /* * We might add our own error codes in the future, e.g for |