]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Avoid implicit conversion from ‘float’ to ‘double’ [-Wdouble-promotion]
authorDavid Kalnischkies <david@kalnischkies.de>
Wed, 23 Nov 2022 17:52:47 +0000 (18:52 +0100)
committerFlole <Flole998@users.noreply.github.com>
Tue, 9 Sep 2025 18:31:27 +0000 (20:31 +0200)
src/dvr/dvr_cutpoints.c
src/epgdb.c
src/epggrab/module/xmltv.c
src/http.h
src/rtsp.c

index a209617359819816d24bec989d4a81c2bdc026dd..a6beed28ebf4070ec2c27a735f8098ad9c6fabcc 100644 (file)
@@ -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;
index 054f35d32efa0221eadcd48301a237fad1c34c2e..e8e21025f1b6794b3a29fe2343c093f191b47f78 100644 (file)
@@ -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;
   }
index 7dce536fc52df5eae437b192409055e62801f044..fe4b4e14e073d5a1c13272f4404c7f61bc80179f 100644 (file)
@@ -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);
 }
index 338c514a87beb7cc84b4f013122135b485bd5dbf..0246311bac398f013f16c5d83ebc249d9f162157 100644 (file)
@@ -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 );
 
index 6a7787910593180e9c06efe877d8c75d26fcc2ec..f4ca839226c40a9b9574e300e1f0e604e423c356 100644 (file)
@@ -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);