From patchwork Thu Jun 30 10:32:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Timothy Redaelli X-Patchwork-Id: 1650675 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=DBtjIcdy; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (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 4LYZQy0FRQz9s07 for ; Thu, 30 Jun 2022 20:32:41 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id B3C7E81761; Thu, 30 Jun 2022 10:32:37 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org B3C7E81761 Authentication-Results: smtp1.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=DBtjIcdy X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bJsoICO08t-I; Thu, 30 Jun 2022 10:32:36 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp1.osuosl.org (Postfix) with ESMTPS id 72E4C813DB; Thu, 30 Jun 2022 10:32:35 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 72E4C813DB Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 332E7C0021; Thu, 30 Jun 2022 10:32:35 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id B6594C0011 for ; Thu, 30 Jun 2022 10:32:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 8BB45813CB for ; Thu, 30 Jun 2022 10:32:34 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 8BB45813CB X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id h0JZMncfjYcN for ; Thu, 30 Jun 2022 10:32:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org DC00981314 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id DC00981314 for ; Thu, 30 Jun 2022 10:32:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656585152; 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; bh=GdkB3qY9ltoog2GkNEdesODQCLAvL6w8Ad2o58IQ6qA=; b=DBtjIcdyastzYKBjak9bWxBwQGxQ78x2SngHJyRBhEMjcWDMTpkJvJf8CAbGGZtkYcZXoB /Sk2B3+Vut9A6Nmr3T6a+CX2hN2n44UDgjX/ntbXdaBlt44ozttvYKsvSzu5nGU2I63dAH w7d94luQbTa2msaGzmrmRU/sItv/KwQ= 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-482-zuCrXy17PYuaFnbuocFLGA-1; Thu, 30 Jun 2022 06:32:31 -0400 X-MC-Unique: zuCrXy17PYuaFnbuocFLGA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E0EA7811E75 for ; Thu, 30 Jun 2022 10:32:30 +0000 (UTC) Received: from aldebaran.redhat.com (unknown [10.39.195.237]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6F64A2026D64 for ; Thu, 30 Jun 2022 10:32:30 +0000 (UTC) From: Timothy Redaelli To: dev@openvswitch.org Date: Thu, 30 Jun 2022 12:32:26 +0200 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 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] 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 ef7bb4b8e..237beb86f 100644 --- a/python/ovs/_json.c +++ b/python/ovs/_json.c @@ -54,7 +54,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; @@ -123,7 +123,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) {