{"id":806539,"url":"http://patchwork.ozlabs.org/api/1.0/patches/806539/?format=json","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/1.0/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20170828113737.12199-1-f4bug@amsat.org>","date":"2017-08-28T11:37:37","name":"tests: fix incorrect size_t format in benchmark-crypto","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"c09ec864f7d1248c529d5029d7102bc892bc6d19","submitter":{"id":70924,"url":"http://patchwork.ozlabs.org/api/1.0/people/70924/?format=json","name":"Philippe Mathieu-Daudé","email":"f4bug@amsat.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20170828113737.12199-1-f4bug@amsat.org/mbox/","series":[{"id":143,"url":"http://patchwork.ozlabs.org/api/1.0/series/143/?format=json","date":"2017-08-28T11:37:37","name":"tests: fix incorrect size_t format in benchmark-crypto","version":1,"mbox":"http://patchwork.ozlabs.org/series/143/mbox/"}],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/806539/checks/","tags":{},"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"b2XCaLQH\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xgqXJ3DJmz9sD9\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 28 Aug 2017 21:38:23 +1000 (AEST)","from localhost ([::1]:39223 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dmIN2-0002BO-IV\n\tfor incoming@patchwork.ozlabs.org; Mon, 28 Aug 2017 07:38:20 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:60423)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dmIMb-00029K-28\n\tfor qemu-devel@nongnu.org; Mon, 28 Aug 2017 07:37:54 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dmIMX-0000s0-Sy\n\tfor qemu-devel@nongnu.org; Mon, 28 Aug 2017 07:37:53 -0400","from mail-qt0-x244.google.com ([2607:f8b0:400d:c0d::244]:33457)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dmIMX-0000r3-O5; Mon, 28 Aug 2017 07:37:49 -0400","by mail-qt0-x244.google.com with SMTP id q53so186487qtq.0;\n\tMon, 28 Aug 2017 04:37:48 -0700 (PDT)","from yoga.offpageads.com ([181.93.89.178])\n\tby smtp.gmail.com with ESMTPSA id b5sm99595qkj.81.2017.08.28.04.37.45\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 28 Aug 2017 04:37:47 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=BzVhGwmGLtnf+FWL9OtTYiv8cvL/yH/Q4Wm7ld9N/nU=;\n\tb=b2XCaLQHD1yOnja/vYRBHll46nAIL7g0glaXaZjUY+GBP5uzUmaLZVTClqHBVTa1Pd\n\tqT0zJRSjhyhYG7Fn2XHwrXV98FJnx0RgC1q9zM4zu6bsIbOzzdOOXnUEGBs7sLDtBQHJ\n\tg/T/7SlJycxHGfBQVVEAfzWOyuf6PfmrE0bIP5pVdOuJ3z9ElMr1f6yOrzmUmvQQT+yI\n\tdn0d9y6OiFlBvQ2FNuQJ0GQfjv28YVTDnp194PB4swub06umoXDdwohfFsMQ5YZgVgrj\n\tXD2MZ7B+IEgsSJUFAGgT5NZhJffyokCBBw5EfAvcpaiebu6qQRY4QcCgyKG84U7iCXRW\n\tHsLQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:from:to:cc:subject:date:message-id\n\t:mime-version:content-transfer-encoding;\n\tbh=BzVhGwmGLtnf+FWL9OtTYiv8cvL/yH/Q4Wm7ld9N/nU=;\n\tb=RusRdzsE+a1PybHDceXA7V7Oynuitp3cYoWnYwK/yHIVToEGuoc0x6F9k+TQnsPSVX\n\t/wp4ERMJUBDgqcGzudhRcLXCVkSmOm3kY+V9mftExFpZtrk3XJxi3mIPeJPHtZ6DBbRs\n\tSz0mTAA/BVEdzbBATljb2ARh6LpjnpLN166ToIZ6pniZbu14RMsgNKZzb95WGYSNW/el\n\tEVam5uz/F1dTHNjacuEQzcJdAiyWjAq6wKZQfIxRH7GcPydZdOuRHBC3ROBkecmN1jee\n\thYUc8QwxAdAY3w7BA/fpAcblyfM8+MWUN9R2VLDCJTtIlULJL05zrBxJIGZej4h3cM0i\n\t4Bzg==","X-Gm-Message-State":"AHYfb5hkpKjQEJW7gycvbv73Km3J7jMAF/EagAbvY2/gtMZwVGq4r0xU\n\tw/3YDR2b/kUseQ==","X-Received":"by 10.200.51.87 with SMTP id u23mr339566qta.144.1503920267826;\n\tMon, 28 Aug 2017 04:37:47 -0700 (PDT)","From":"=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org>","To":"\"Daniel P . Berrange\" <berrange@redhat.com>,\n\tLongpeng <longpeng2@huawei.com>","Date":"Mon, 28 Aug 2017 08:37:37 -0300","Message-Id":"<20170828113737.12199-1-f4bug@amsat.org>","X-Mailer":"git-send-email 2.14.1","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2607:f8b0:400d:c0d::244","Subject":"[Qemu-devel] [PATCH] tests: fix incorrect size_t format in\n\tbenchmark-crypto","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"qemu-trivial@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?=\n\t<f4bug@amsat.org>, \tqemu-devel@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"},"content":"$ make check-speed\n  tests/benchmark-crypto-hash.c: In function 'test_hash_speed':\n  tests/benchmark-crypto-hash.c:44:5: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'size_t' [-Werror=format=]\n       g_print(\"Testing chunk_size %ld bytes \", chunk_size);\n       ^\n  tests/benchmark-crypto-hash.c: In function 'main':\n  tests/benchmark-crypto-hash.c:62:9: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' [-Werror=format=]\n           snprintf(name, sizeof(name), \"/crypto/hash/speed-%lu\", i);\n           ^\n  cc1: all warnings being treated as errors\n  rules.mak:66: recipe for target 'tests/benchmark-crypto-hash.o' failed\n  make: *** [tests/benchmark-crypto-hash.o] Error 1\n\nSigned-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>\n---\ntesting v2.10.0-rc4\n\n tests/benchmark-crypto-cipher.c | 4 ++--\n tests/benchmark-crypto-hash.c   | 4 ++--\n tests/benchmark-crypto-hmac.c   | 4 ++--\n 3 files changed, 6 insertions(+), 6 deletions(-)","diff":"diff --git a/tests/benchmark-crypto-cipher.c b/tests/benchmark-crypto-cipher.c\nindex c6a40929e4..cf98443468 100644\n--- a/tests/benchmark-crypto-cipher.c\n+++ b/tests/benchmark-crypto-cipher.c\n@@ -59,7 +59,7 @@ static void test_cipher_speed(const void *opaque)\n     total /= 1024 * 1024; /* to MB */\n \n     g_print(\"cbc(aes128): \");\n-    g_print(\"Testing chunk_size %ld bytes \", chunk_size);\n+    g_print(\"Testing chunk_size %zu bytes \", chunk_size);\n     g_print(\"done: %.2f MB in %.2f secs: \", total, g_test_timer_last());\n     g_print(\"%.2f MB/sec\\n\", total / g_test_timer_last());\n \n@@ -80,7 +80,7 @@ int main(int argc, char **argv)\n \n     for (i = 512; i <= (64 * 1204); i *= 2) {\n         memset(name, 0 , sizeof(name));\n-        snprintf(name, sizeof(name), \"/crypto/cipher/speed-%lu\", i);\n+        snprintf(name, sizeof(name), \"/crypto/cipher/speed-%zu\", i);\n         g_test_add_data_func(name, (void *)i, test_cipher_speed);\n     }\n \ndiff --git a/tests/benchmark-crypto-hash.c b/tests/benchmark-crypto-hash.c\nindex 6769d2a11b..122bfb6b85 100644\n--- a/tests/benchmark-crypto-hash.c\n+++ b/tests/benchmark-crypto-hash.c\n@@ -41,7 +41,7 @@ static void test_hash_speed(const void *opaque)\n \n     total /= 1024 * 1024; /* to MB */\n     g_print(\"sha256: \");\n-    g_print(\"Testing chunk_size %ld bytes \", chunk_size);\n+    g_print(\"Testing chunk_size %zu bytes \", chunk_size);\n     g_print(\"done: %.2f MB in %.2f secs: \", total, g_test_timer_last());\n     g_print(\"%.2f MB/sec\\n\", total / g_test_timer_last());\n \n@@ -59,7 +59,7 @@ int main(int argc, char **argv)\n \n     for (i = 512; i <= (64 * 1204); i *= 2) {\n         memset(name, 0 , sizeof(name));\n-        snprintf(name, sizeof(name), \"/crypto/hash/speed-%lu\", i);\n+        snprintf(name, sizeof(name), \"/crypto/hash/speed-%zu\", i);\n         g_test_add_data_func(name, (void *)i, test_hash_speed);\n     }\n \ndiff --git a/tests/benchmark-crypto-hmac.c b/tests/benchmark-crypto-hmac.c\nindex 72408be987..c30250df3e 100644\n--- a/tests/benchmark-crypto-hmac.c\n+++ b/tests/benchmark-crypto-hmac.c\n@@ -56,7 +56,7 @@ static void test_hmac_speed(const void *opaque)\n     total /= 1024 * 1024; /* to MB */\n \n     g_print(\"hmac(sha256): \");\n-    g_print(\"Testing chunk_size %ld bytes \", chunk_size);\n+    g_print(\"Testing chunk_size %zu bytes \", chunk_size);\n     g_print(\"done: %.2f MB in %.2f secs: \", total, g_test_timer_last());\n     g_print(\"%.2f MB/sec\\n\", total / g_test_timer_last());\n \n@@ -74,7 +74,7 @@ int main(int argc, char **argv)\n \n     for (i = 512; i <= (64 * 1204); i *= 2) {\n         memset(name, 0 , sizeof(name));\n-        snprintf(name, sizeof(name), \"/crypto/hmac/speed-%lu\", i);\n+        snprintf(name, sizeof(name), \"/crypto/hmac/speed-%zu\", i);\n         g_test_add_data_func(name, (void *)i, test_hmac_speed);\n     }\n \n","prefixes":[]}