From: Aurelien Jacobs Date: Thu, 12 Feb 2015 10:24:11 +0000 (+0100) Subject: Remove the inline qualification from sr_rational_set(). X-Git-Tag: libsigrok-0.4.0~646 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=2617c81a4b101714bf90173f4da0724007c58219;p=libsigrok.git Remove the inline qualification from sr_rational_set(). Inlining can only happen in the same compilation unit where the function was defined, so there is no sense declaring an inline function in a header if this function is not defined in this same header. This fixes the following gcc-5 warning: In file included from include/libsigrok/libsigrok.h:1066:0, from src/version.c:21: include/libsigrok/proto.h:36:20: warning: inline function 'sr_rational_set' declared but never defined SR_API inline void sr_rational_set(struct sr_rational *r, uint64_t p, uint64_t q); ^ --- diff --git a/include/libsigrok/proto.h b/include/libsigrok/proto.h index 9f11747a..ea9b8449 100644 --- a/include/libsigrok/proto.h +++ b/include/libsigrok/proto.h @@ -33,7 +33,7 @@ SR_API int sr_analog_to_float(const struct sr_datafeed_analog2 *analog, SR_API int sr_analog_float_to_string(float value, int digits, char **result); SR_API int sr_analog_unit_to_string(const struct sr_datafeed_analog2 *analog, char **result); -SR_API inline void sr_rational_set(struct sr_rational *r, uint64_t p, uint64_t q); +SR_API void sr_rational_set(struct sr_rational *r, uint64_t p, uint64_t q); /*--- backend.c -------------------------------------------------------------*/ diff --git a/src/analog.c b/src/analog.c index 01704fd7..3819e367 100644 --- a/src/analog.c +++ b/src/analog.c @@ -235,7 +235,7 @@ SR_API int sr_analog_unit_to_string(const struct sr_datafeed_analog2 *analog, * @param p Numerator * @param q Denominator */ -SR_API inline void sr_rational_set(struct sr_rational *r, uint64_t p, uint64_t q) +SR_API void sr_rational_set(struct sr_rational *r, uint64_t p, uint64_t q) { r->p = p; r->q = q;