From 6f49d0294da571dcb655ab5e7d29accf4012396c Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 5 May 2013 20:14:12 +0200 Subject: [PATCH] cRecord: fix compiler warning (type mismatch) Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/88b8aa7b8f78f22c07b99342c3c765395d34b430 Author: Stefan Seyfried Date: 2013-05-05 (Sun, 05 May 2013) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libspark/record.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libspark/record.cpp b/libspark/record.cpp index 79497a8..9ed6e36 100644 --- a/libspark/record.cpp +++ b/libspark/record.cpp @@ -174,7 +174,6 @@ void cRecord::RecordThread() lt_info("%s: begin\n", __func__); #define BUFSIZE (1 << 20) /* 1MB */ #define READSIZE (BUFSIZE / 16) - ssize_t r = 0; int buf_pos = 0; int queued = 0; uint8_t *buf; @@ -197,6 +196,7 @@ void cRecord::RecordThread() dmx->Start(); bool overflow = false; + int r = 0; while (exit_flag == RECORD_RUNNING) { if (buf_pos < BUFSIZE) @@ -204,10 +204,10 @@ void cRecord::RecordThread() int toread = BUFSIZE - buf_pos; if (toread > READSIZE) toread = READSIZE; - r = dmx->Read(buf + buf_pos, toread, 50); - lt_debug("%s: buf_pos %6d r %6d / %6d\n", __func__, - buf_pos, (int)r, BUFSIZE - buf_pos); - if (r < 0) + ssize_t s = dmx->Read(buf + buf_pos, toread, 50); + lt_debug("%s: buf_pos %6d s %6d / %6d\n", __func__, + buf_pos, (int)s, BUFSIZE - buf_pos); + if (s < 0) { if (errno != EAGAIN && (errno != EOVERFLOW || !overflow)) { @@ -220,7 +220,7 @@ void cRecord::RecordThread() else { overflow = false; - buf_pos += r; + buf_pos += s; } } else