summaryrefslogtreecommitdiff
path: root/ci.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-10-07 11:13:18 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2012-10-07 11:13:18 +0200
commit9f832ef482346bdf1917df21e485f35098b9bebc (patch)
treef85ed07c1546c89d89688d298fdc38b680b0eeaf /ci.c
parent86fc7ba77cd70c453075ec7c4d7d40580388e964 (diff)
downloadvdr-9f832ef482346bdf1917df21e485f35098b9bebc.tar.gz
vdr-9f832ef482346bdf1917df21e485f35098b9bebc.tar.bz2
Fixed some compiler warnings under gcc version 4.7.1
Diffstat (limited to 'ci.c')
-rw-r--r--ci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ci.c b/ci.c
index ebed3204..904697eb 100644
--- a/ci.c
+++ b/ci.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: ci.c 2.9 2012/05/29 11:13:40 kls Exp $
+ * $Id: ci.c 2.10 2012/10/07 11:11:18 kls Exp $
*/
#include "ci.h"
@@ -845,9 +845,9 @@ void cCiDateTime::SendDateTime(void)
int D = tm_gmt.tm_mday;
int L = (M == 1 || M == 2) ? 1 : 0;
int MJD = 14956 + D + int((Y - L) * 365.25) + int((M + 1 + L * 12) * 30.6001);
-#define DEC2BCD(d) (((d / 10) << 4) + (d % 10))
+#define DEC2BCD(d) uint8_t(((d / 10) << 4) + (d % 10))
struct tTime { uint16_t mjd; uint8_t h, m, s; short offset; };
- tTime T = { mjd : htons(MJD), h : DEC2BCD(tm_gmt.tm_hour), m : DEC2BCD(tm_gmt.tm_min), s : DEC2BCD(tm_gmt.tm_sec), offset : htons(tm_loc.tm_gmtoff / 60) };
+ tTime T = { mjd : htons(MJD), h : DEC2BCD(tm_gmt.tm_hour), m : DEC2BCD(tm_gmt.tm_min), s : DEC2BCD(tm_gmt.tm_sec), offset : short(htons(tm_loc.tm_gmtoff / 60)) };
bool OldDumpTPDUDataTransfer = DumpTPDUDataTransfer;
DumpTPDUDataTransfer &= DumpDateTime;
if (DumpDateTime)