From: Philippe Waroquiers Date: Thu, 30 Apr 2015 20:30:12 +0000 (+0000) Subject: Rename write variable to avoid a warning: X-Git-Tag: svn/VALGRIND_3_11_0~441 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9f9c5c6947c5f57fac59ff0cb1a9c88d8231b1d7;p=thirdparty%2Fvalgrind.git Rename write variable to avoid a warning: memrw.c:37: warning: declaration of ‘write’ shadows a global declaration /usr/include/unistd.h:333: warning: shadowed declaration is here git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15167 --- diff --git a/perf/memrw.c b/perf/memrw.c index c368f26f23..c10c38481d 100644 --- a/perf/memrw.c +++ b/perf/memrw.c @@ -34,20 +34,20 @@ static unsigned char **mb; static void *memrw_fn(void *v) { int loops, m, b; - int write; + int dowrite; int differs = 0; unsigned char prev = 0; for (loops = 0; loops < nr_loops; loops++) { - // printf("loop %d write %d\n", loops, write); + // printf("loop %d dowrite %d\n", loops, dowrite); // Note: in case of multiple threads, we will have // to add lock/unlock somewhere in the below, maybe to lock // the MB we are reading or writing. for (m = 0; m < nr_mb_ws; m++) { for (b = 0; b < 1024 * 1024; b++) { - write = b % 5 == 0; + dowrite = b % 5 == 0; // Do some write or read operations. - if (write) { + if (dowrite) { if (mb[m][b] < 255) mb[m][b] += differs; else