From patchwork Tue May 12 15:22:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Tu X-Patchwork-Id: 1288551 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=XLM+OgwN; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49M1lw03Gjz9sRf for ; Wed, 13 May 2020 01:23:24 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 720B089401; Tue, 12 May 2020 15:23:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hTHFowlYMfM4; Tue, 12 May 2020 15:23:21 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id 45726893FE; Tue, 12 May 2020 15:23:21 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 2A7E8C088E; Tue, 12 May 2020 15:23:21 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 2348EC016F for ; Tue, 12 May 2020 15:23:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 12D178867D for ; Tue, 12 May 2020 15:23:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4KEXkwD3x685 for ; Tue, 12 May 2020 15:23:19 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pj1-f65.google.com (mail-pj1-f65.google.com [209.85.216.65]) by whitealder.osuosl.org (Postfix) with ESMTPS id 0FD9C86B3B for ; Tue, 12 May 2020 15:23:19 +0000 (UTC) Received: by mail-pj1-f65.google.com with SMTP id z15so761797pjb.0 for ; Tue, 12 May 2020 08:23:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/c+dDrnqQsQWnGZ3v8LQJkZvhDe/vcgSg+lGRaF+3x4=; b=XLM+OgwN8bV8M7+p5BEGkiP5+JacR5CfPFLP2fYQIaJi+KzOufNMBoXEyHXGdbvSST A4aMjAW7ZW9NoXHlbYM7cKZ1A+8KwJn7T/ILl7J5vv7DBxrGxB6LJhhPnFrJFJ05ltFR FIvCIJNM2rCrt5ZrBBbUDoq3OepxzpeXgfSHD/1rPAaKmenTnhu3fj4G5mj0FoOEB33K UkRdDePnD8T1UemqvzWxXl+q1N0NJG6zOXiAV2+dHsc6QGPLBsWoTj0pTUSrzNYfLA1/ Svln9T4TTKUcJ3RlmDy0C8/9sCFBOMKztq7wTupFz4lH7ReC7QtSjulJBP+WAQBQuSIr FKvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/c+dDrnqQsQWnGZ3v8LQJkZvhDe/vcgSg+lGRaF+3x4=; b=jY1YUIzq7PVy12npznM/UaFna+4dVxDChh3pAv/SHBlD/+z9dKrj1mWrym2P1PN1Fc W41jN5BlGPJk0HNHjxJ4L4cbh/9pU0j6aqdlEo1kXlJ17tXeA7Z08Mtj32ARjXasSp1m clysNqqUKXWBwLwdV39JW5CULDRSOMONsvwm8Fje9zX3UP/pc5RpKDYpD5iMfFf7028d 0zMCeeIZ3/f0rr3S9bTKv/+NzZKkSx3WRuSoduXq0OPw6eOxI59RsehAJcCa7tDuRr3b 4HjW2YYy+2kJ7C8GpZ92Uj8VmnpmBxAF4CiQoHp6djiQ3FEt/CAgUb90ELPgD4t7HSNi 97HA== X-Gm-Message-State: AGi0PuZ1HRnTvRsv5816ze5yPvdQ5nbRIXzBxhlJuhIdVMhgKlh3D66h wqyBGc+DVGS1uM5+F4kC+uGs5bLfAg8= X-Google-Smtp-Source: APiQypLrQLjd0wTAhOoY/GMXUZYD2DV97KXloedgBKH9nNYVn7I5oWH55ZCsNiIsHabvKsJ5gH3RJQ== X-Received: by 2002:a17:90a:fc89:: with SMTP id ci9mr28880867pjb.140.1589296998012; Tue, 12 May 2020 08:23:18 -0700 (PDT) Received: from sc9-mailhost2.vmware.com (c-76-21-95-192.hsd1.ca.comcast.net. [76.21.95.192]) by smtp.gmail.com with ESMTPSA id m19sm13105032pjv.30.2020.05.12.08.23.17 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 May 2020 08:23:17 -0700 (PDT) From: William Tu To: dev@openvswitch.org Date: Tue, 12 May 2020 08:22:31 -0700 Message-Id: <1589296951-75730-2-git-send-email-u9012063@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1589296951-75730-1-git-send-email-u9012063@gmail.com> References: <1589296951-75730-1-git-send-email-u9012063@gmail.com> Cc: Bhargava Shastry Subject: [ovs-dev] [PATCH 2/2] oss-fuzz: Fix miniflow_target.c. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Clang reports: tests/oss-fuzz/miniflow_target.c:209:26: error: suggest braces around \ initialization of subobject [-Werror,-Wmissing-braces] struct flow flow2 = {0}; Fix it by using memset. Cc: Bhargava Shastry Cc: Yifeng Sun Signed-off-by: William Tu Reviewed-by: Yifeng Sun --- tests/oss-fuzz/miniflow_target.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/oss-fuzz/miniflow_target.c b/tests/oss-fuzz/miniflow_target.c index 393443061e85..50b8b0e64237 100644 --- a/tests/oss-fuzz/miniflow_target.c +++ b/tests/oss-fuzz/miniflow_target.c @@ -206,8 +206,9 @@ test_minimask_combine(struct flow *flow) struct minimask minicombined; uint64_t storage[FLOW_U64S]; } m; - struct flow flow2 = {0}; + struct flow flow2; + memset(&flow2, 0, sizeof flow2); mask.masks = *flow; minimask = minimask_create(&mask);