From dc9f6d250ae3dd044149518786ef0ed523169fcb Mon Sep 17 00:00:00 2001 From: cfsmp3 Date: Sun, 18 Jan 2015 22:56:26 +0100 Subject: [PATCH] Fix annoying warning in OSX build --- src/lib_ccx/es_functions.c | 3 ++- src/lib_ccx/file_functions.c | 2 +- src/lib_ccx/params.c | 2 +- src/lib_ccx/telxcc.c | 6 +++--- src/win_spec_incld/dirent.h | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/lib_ccx/es_functions.c b/src/lib_ccx/es_functions.c index d1852863..e9d8731a 100644 --- a/src/lib_ccx/es_functions.c +++ b/src/lib_ccx/es_functions.c @@ -427,7 +427,8 @@ static int sequence_header(struct lib_ccx_ctx *ctx, struct bitstream *esstream) // whole sequence info. if (vert_size >= 288 && vert_size <= 1088 && hor_size >= 352 && hor_size <= 1920 && - hor_size / vert_size >= 352/576 && hor_size / vert_size <= 2 && + (hor_size*100) / vert_size >= (352*100)/576 && // The weird *100 is to avoid using floats + hor_size / vert_size <= 2 && frame_rate>0 && frame_rate<9 && aspect_ratio>0 && aspect_ratio<5) { diff --git a/src/lib_ccx/file_functions.c b/src/lib_ccx/file_functions.c index 780f3525..dfd342c5 100644 --- a/src/lib_ccx/file_functions.c +++ b/src/lib_ccx/file_functions.c @@ -246,7 +246,7 @@ void buffered_seek (struct lib_ccx_ctx *ctx, int offset) if (filebuffer_pos<0) { // We got into the start buffer (hopefully) - if (ctx->startbytes_pos+filebuffer_pos < 0) + if ((filebuffer_pos+ctx->startbytes_pos) < 0) { fatal (CCX_COMMON_EXIT_BUG_BUG, "PANIC: Attempt to seek before buffer start, this is a bug!"); } diff --git a/src/lib_ccx/params.c b/src/lib_ccx/params.c index b476d9b7..73fdb210 100644 --- a/src/lib_ccx/params.c +++ b/src/lib_ccx/params.c @@ -129,7 +129,7 @@ int parsedelay (struct ccx_s_options *opt, char *par) c++; } if (sign) - opt->subs_delay =- opt->subs_delay; + opt->subs_delay = -opt->subs_delay; return 0; } diff --git a/src/lib_ccx/telxcc.c b/src/lib_ccx/telxcc.c index 3dd2122b..570a1065 100644 --- a/src/lib_ccx/telxcc.c +++ b/src/lib_ccx/telxcc.c @@ -503,7 +503,7 @@ void process_page(struct lib_ccx_ctx *ctx, teletext_page_t *page) { page_buffer_add_string("
"); break; default: - page_buffer_add_string(encoded_crlf); + page_buffer_add_string((const char *) encoded_crlf); } } @@ -656,8 +656,8 @@ void process_page(struct lib_ccx_ctx *ctx, teletext_page_t *page) { } break; default: // Yes, this means everything else is .srt for now - page_buffer_add_string (encoded_crlf); - page_buffer_add_string (encoded_crlf); + page_buffer_add_string ((const char *) encoded_crlf); + page_buffer_add_string((const char *) encoded_crlf); if (ctx->wbout1.fh!=-1) { fdprintf(ctx->wbout1.fh,"%"PRIu32"%s%s --> %s%s", tlt_frames_produced, encoded_crlf, timecode_show, timecode_hide, encoded_crlf); fdprintf(ctx->wbout1.fh, "%s",page_buffer_cur); diff --git a/src/win_spec_incld/dirent.h b/src/win_spec_incld/dirent.h index 6f959a50..7d425c23 100644 --- a/src/win_spec_incld/dirent.h +++ b/src/win_spec_incld/dirent.h @@ -22,7 +22,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. * - * $Id: dirent.h,v 1.20 2014/03/19 17:52:23 tronkko Exp $ + * $Id: dirent.h,v 1.1 2015/01/16 07:40:15 cfsmp3 Exp $ */ #ifndef DIRENT_H #define DIRENT_H