From: Martin Quinson Date: Sat, 19 Sep 2015 22:25:00 +0000 (+0200) Subject: [MSVC] convert unsigned to signed before applying unary minus X-Git-Tag: v3_12~171 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/9be91a57320f0578db6fcba810c095a49c2475c2 [MSVC] convert unsigned to signed before applying unary minus This should avoid the following: warning C4146: unary minus operator applied to unsigned type, result still unsigned --- diff --git a/src/xbt/xbt_log_appender_file.c b/src/xbt/xbt_log_appender_file.c index d06d9b9d00..53427762ef 100644 --- a/src/xbt/xbt_log_appender_file.c +++ b/src/xbt/xbt_log_appender_file.c @@ -105,7 +105,7 @@ static void append2_file(xbt_log_appender_t this_, char *str) { fputs(str, d->file); if(d->count<0){ fputs(APPEND2_END_TOKEN,d->file); - fseek(d->file,-strlen(APPEND2_END_TOKEN),SEEK_CUR); + fseek(d->file,-((signed long)strlen(APPEND2_END_TOKEN)),SEEK_CUR); } }