From: David Kalnischkies Date: Wed, 23 Nov 2022 17:52:47 +0000 (+0100) Subject: Avoid implicit conversion from ‘float’ to ‘double’ [-Wdouble-promotion] X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d26b3f173bbd64d98ea821639cc3c4f0c77aaf17;p=thirdparty%2Ftvheadend.git Avoid implicit conversion from ‘float’ to ‘double’ [-Wdouble-promotion] --- diff --git a/src/dvr/dvr_cutpoints.c b/src/dvr/dvr_cutpoints.c index a20961735..a6beed28e 100644 --- a/src/dvr/dvr_cutpoints.c +++ b/src/dvr/dvr_cutpoints.c @@ -64,10 +64,10 @@ dvr_parse_edl ( const char *line, dvr_cutpoint_t *cutpoint, float *frame ) { int action = 0; - float start = 0.0f, end = 0.0f; + double start = 0.0, end = 0.0; /* Invalid line */ - if (sscanf(line, "%f\t%f\t%d", &start, &end, &action) != 3) + if (sscanf(line, "%lf\t%lf\t%d", &start, &end, &action) != 3) return 1; /* Sanity Checks */ @@ -78,8 +78,8 @@ dvr_parse_edl } /* Set values */ - cutpoint->dc_start_ms = (int) (start * 1000.0f); - cutpoint->dc_end_ms = (int) (end * 1000.0f); + cutpoint->dc_start_ms = (int) (start * 1000.0); + cutpoint->dc_end_ms = (int) (end * 1000.0); cutpoint->dc_type = action; return 0; diff --git a/src/epgdb.c b/src/epgdb.c index 054f35d32..e8e21025f 100644 --- a/src/epgdb.c +++ b/src/epgdb.c @@ -180,7 +180,7 @@ void epg_init ( void ) (rp[7] == '0' || rp[7] == '1')) { uint32_t orig = (rp[8] << 24) | (rp[9] << 16) | (rp[10] << 8) | rp[11]; tvhinfo(LS_EPGDB, "gzip format detected, inflating (ratio %.1f%% deflated size %zd)", - (float)((remain * 100.0) / orig), remain); + ((remain * 100.0) / orig), remain); rp = zlib_mem = tvh_gzip_inflate(rp + 12, remain - 12, orig); remain = rp ? orig : 0; } diff --git a/src/epggrab/module/xmltv.c b/src/epggrab/module/xmltv.c index 7dce536fc..fe4b4e14e 100644 --- a/src/epggrab/module/xmltv.c +++ b/src/epggrab/module/xmltv.c @@ -412,7 +412,7 @@ static int _xmltv_parse_star_rating a = strtod(s1, &s1end); b = strtod(s2 + 1, &s2end); - if ( a == 0.0f || b == 0.0f) return 0; + if ( a == 0.0 || b == 0.0) return 0; return epg_broadcast_set_star_rating(ebc, (100 * a) / b, changes); } diff --git a/src/http.h b/src/http.h index 338c514a8..0246311ba 100644 --- a/src/http.h +++ b/src/http.h @@ -523,7 +523,7 @@ rtsp_teardown( http_client_t *hc, const char *path, const char *query ) { int rtsp_get_parameter( http_client_t *hc, const char *parameter ); -int rtsp_set_speed( http_client_t *hc, float speed ); +int rtsp_set_speed( http_client_t *hc, double speed ); int rtsp_set_position( http_client_t *hc, time_t position ); diff --git a/src/rtsp.c b/src/rtsp.c index 6a7787910..f4ca83922 100644 --- a/src/rtsp.c +++ b/src/rtsp.c @@ -316,7 +316,7 @@ rtsp_get_parameter( http_client_t *hc, const char *parameter ) { } int -rtsp_set_speed( http_client_t *hc, float speed ) { +rtsp_set_speed( http_client_t *hc, double speed ) { char buf[64]; http_arg_list_t h; http_arg_init(&h);