From patchwork Mon Jul 18 10:40:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Timothy Redaelli X-Patchwork-Id: 1657378 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=QusbWFyf; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lmdlb52Yrz9sFk for ; Mon, 18 Jul 2022 20:40:27 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 5A62440B00; Mon, 18 Jul 2022 10:40:25 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 5A62440B00 Authentication-Results: smtp2.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=QusbWFyf X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t0FVuZvczz04; Mon, 18 Jul 2022 10:40:24 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTPS id 5CB8740AFA; Mon, 18 Jul 2022 10:40:23 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 5CB8740AFA Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1B269C007D; Mon, 18 Jul 2022 10:40:23 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 97FFDC007D for ; Mon, 18 Jul 2022 10:40:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 6287640AE8 for ; Mon, 18 Jul 2022 10:40:21 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 6287640AE8 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3hvebBulUz98 for ; Mon, 18 Jul 2022 10:40:20 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 9FFD840AE3 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id 9FFD840AE3 for ; Mon, 18 Jul 2022 10:40:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658140819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=u/s9jP7wSwvy9FNbwQGeTqxHCocj/EDKJ1nP3JIDJrI=; b=QusbWFyf6Ri5IXGpw5tk9jRw70OliBzoZGI0atJyrVvcgziR/aftwi2YEvJwwVFOjA0/NC Lwb1cVr2tEOSLUELrxhRahu6hDUfwi1TnBRqzBwmbEeZCqdbbvhOSS02hcK1UpW0wKRbmv xRS4j2kztzqe296xt6SIFI571BRnl8Q= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-380--GyIfT4COQ24L0ksMlYVLQ-1; Mon, 18 Jul 2022 06:40:12 -0400 X-MC-Unique: -GyIfT4COQ24L0ksMlYVLQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0BE94811E81 for ; Mon, 18 Jul 2022 10:40:12 +0000 (UTC) Received: from aldebaran.redhat.com (unknown [10.39.194.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 89F391415121 for ; Mon, 18 Jul 2022 10:40:11 +0000 (UTC) From: Timothy Redaelli To: dev@openvswitch.org Date: Mon, 18 Jul 2022 12:40:02 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=tredaelli@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH v2 2/2] python-c-ext: fix a couple of build warnings 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: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" ovs/_json.c:67:20: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] ovs/_json.c:132:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] Signed-off-by: Timothy Redaelli --- python/ovs/_json.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/ovs/_json.c b/python/ovs/_json.c index 80bf9dea3..0b980038b 100644 --- a/python/ovs/_json.c +++ b/python/ovs/_json.c @@ -50,7 +50,7 @@ Parser_feed(json_ParserObject * self, PyObject * args) Py_ssize_t input_sz; PyObject *input; size_t rd; - char *input_str; + const char *input_str; if (self->_parser == NULL) { return NULL; @@ -111,7 +111,7 @@ json_to_python(struct json *json) return dict; } case JSON_ARRAY:{ - int i; + size_t i; PyObject *arr = PyList_New(json->array.n); if (arr == NULL) {