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);
                    ^
This commit is contained in:
Aurelien Jacobs 2015-02-12 11:24:11 +01:00
parent ee29d92e14
commit 2617c81a4b
2 changed files with 2 additions and 2 deletions

View File

@ -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 -------------------------------------------------------------*/

View File

@ -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;