From patchwork Fri Jul 12 15:22:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Eggers X-Patchwork-Id: 1959932 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20230601 header.b=IIrwJLoc; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::f3e; helo=mail-qv1-xf3e.google.com; envelope-from=swupdate+bncbdk7hq7yrekrb3muyw2amgqeywip5kq@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-qv1-xf3e.google.com (mail-qv1-xf3e.google.com [IPv6:2607:f8b0:4864:20::f3e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WLFjY0gYbz1xqj for ; Sat, 13 Jul 2024 01:23:28 +1000 (AEST) Received: by mail-qv1-xf3e.google.com with SMTP id 6a1803df08f44-6b5dfeae8casf28074086d6.2 for ; Fri, 12 Jul 2024 08:23:28 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1720797806; cv=pass; d=google.com; s=arc-20160816; b=dufIV1mWnBeqsvwjW5Kw6rWOQJRh/ToIxi3YoKuV0RWbgP7f2JNle2wAgdftCZFNMk a5oP82sE+qqQrXv4d4Z1+ivwsD+oL4FVAFGmOx7d84zyzN0MOgqDH15LiDE9sQqelM3T oK9iNcjzLazxz4pVwg8TyKabx40UMZjzuxstXVd5PxHrN9Xe8A+df1zL0SRanNCwsel2 8wpgv2mCmwnpJs4XKN5MN1xHbL5v7jOuIl99PFNqem6D4Ms8aj5KsMs04n+79ZR7Q78E Zq+SxepstFfqOb7Vzlg87JpHpzREGZerPmidV5GdGCWZsqil4NzHhaoD9LG3wnaksJOU Tl+A== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=QmnhI1Uzk6A0ybaYqk7X2A43Ezz4lGH9/SadHbvxxXo=; fh=6bC4B56ulP0D2XZPsmmHA9eLqQT3s3eZyhDyRr4qgBw=; b=OvxvtSy0SddLGuI8eOj2V+3zuUqijNFOxdvA+VyQNFCHf+lMAn4ohFu5/qjNWRzUXY DtcRMzFwjiWK+4Yv7uhcBe31B+sXnpl5YT43nE/17jjbxh/fm0eg8GAg6DhFtRrIHpKd d5kZaWbwZXB2VCtaj3x2juXhW6jHmBrAI4kcXT4bWj3ZZ4IaDgyERBrrFi86dlVm8P0W Xodb9Rkw+bL5gG19q7b4UGx+j/JggdPfpkujj+qakbAxIVL7Z8hisr4vVOt7lJTxUzZG 5bsLm4RTum7E9Fq6jbu+WvsRs5ac2H3bIUFhWDdtSFSbZ9PtAQeahlAsectMrG/TCa8L J2bA==; darn=patchwork.ozlabs.org ARC-Authentication-Results: i=3; gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=WSHV1RAv; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2613::600 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1720797806; x=1721402606; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=QmnhI1Uzk6A0ybaYqk7X2A43Ezz4lGH9/SadHbvxxXo=; b=IIrwJLocGxeSB2X+WHsbDUJURtNbc7UfDLK/fmoJj2SCbWG4T5v4KQpqkZJOTk5fG9 0XsIWisrmXVIpN8XyHtUTPHRnW8OIzd1WKk6PJ7ftcgiJ5ro9PIaytVqPaSZuNF2BkOC lQAgSRIfsmstrkEp6nIqwYSswV9XfoUDGqIUAa2nGxhOwKlxF2eTfStO9V1MQ6SsVczI qol0EsuOEK0PNOrTYAhHhnqUAYQI81HX5tGHiVheQEYQRvdEonOxAqxWnwcebp3IYLiJ mqgXZy7y02a7Cqpwg7/p4xClnNfqxx1XU1eq1WGlSSETEGLGok0tFv8/8aynvykj3wQX uEuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720797806; x=1721402606; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=QmnhI1Uzk6A0ybaYqk7X2A43Ezz4lGH9/SadHbvxxXo=; b=aVvqtyMlh3gzk0szimkh+Un0BIGh5T1ehvqxGcmhWfYgKQzR8MzsxD69aOuFz9Q+wO ptNCf1D+2usWkUMp2uIcz/Vf1luOASMaxsL8enOWFhkQ7bORCIRtLF9/SZwDgV5jn3Kx 9uRfo9XyWcG7Gab1mLF6+gZkHh2I93Ov/Qm5rblQU/8Z5YlgGCC5ARhoByCHLZkw3Agz J9qJjvP8RWp2RO+cP564rwtsz1UspZK+QDKvV+RlDZGhwIejKMrgt4Qw/OIe/YjZ+lqq hEebS02bpD4DeDqYCzkgDYWOHYMeHy+kY2XQeLExOR1Ii+fO5DWJ7dtBXmKWveiHloRq +4eQ== Sender: swupdate@googlegroups.com X-Forwarded-Encrypted: i=3; AJvYcCU8w6ND0e9MfpnK56xqO8VwTP4p8Va+b86eWVg/Pw59xS58d55vQOjT5YXepYq0DK+RdcZ2bRHSrDTsI/a/a9uDdRoImkpjHgjc6klcnQ== X-Gm-Message-State: AOJu0Yy1P7qeGMh6CJE9kzNFbz+kucR6iTJCW005wOt3W/GcA21lhllY Ph1XNIx9tF+BO8/tjqby1JboDnnuO5FvdmZGkOIu5kc/XGvp2Edx X-Google-Smtp-Source: AGHT+IHFX7TkURFm1KVHfN1WeAfdn/abVEJYj43ChGzludO/UrzmNouOmXamWyG/hrQ5P3ke8eqaaA== X-Received: by 2002:a05:6214:1c83:b0:6b0:6a57:c982 with SMTP id 6a1803df08f44-6b61bcff6edmr140715406d6.28.1720797806259; Fri, 12 Jul 2024 08:23:26 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:6214:1911:b0:6b0:78b3:9c4b with SMTP id 6a1803df08f44-6b74b325245ls29844076d6.0.-pod-prod-01-us; Fri, 12 Jul 2024 08:23:25 -0700 (PDT) X-Received: by 2002:a05:6122:16a1:b0:4ef:6454:cac1 with SMTP id 71dfb90a1353d-4f33f339e0bmr13583875e0c.15.1720797804545; Fri, 12 Jul 2024 08:23:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1720797804; cv=pass; d=google.com; s=arc-20160816; b=pywCy18dnMG3jAecOrNRP6h8kmoUOXxxpJLZc21n5cnoNCHBpmJ/4rIoVtIznULo39 xJ1+8xa1gUNqXdoESDRz9X45N8JReqbXAfa5YU3/HSt0tWgca7ihHvfB740pxjn6mSqq TVg+33ThSf7lrJnO6blrzteBLuBi996aGOjo/tdDSXoUrL2E+vKcmcDKz2qWmU/8TKDy c8FkYaTrvLkmD1e9XaiidsUMkYdwfqcFXkmzS5dNTG9lNDFvDDaCFAklZZANjHLlsBTu J22B1JYCH38sX1Y8yhzgz9w10j4CrthpiMVaTfFTdX7ZHE5W6dCIF6LL7EYSC61RKH16 Bu9w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=VMaeGD6Q5TkEwavN5DFy8NeVFjwz/ANkbd3ZMa5/bhA=; fh=Zaas7zo9QAZR51NXyZEDKjGEOyAL/jH6m/nrwgSdorI=; b=vkZ0NivQ/6/B8vx2g7Lk7i8ksllblnLGBtShFk3oNPGDIrNA6sT5fv5r/mp1UVieaJ nKz+EnvmSivpvszRaBTFU4SAM46uRxr0Y2q9kgrBG9n9MBF6TytFI6D61Fo1/A9/0Pno CuHJFJJjfzIOHEhaxlYbBW4TzuMlFa1ILDl2p7EM512JWQwztCas3iENbDKGXPu+cUTA rUQcu1gzmF5gslSvBKdGrFNm+MrKY7H4kFXF7uhVGhQkymngA3dXk0ZaWr764qQsQR+E Rc2R8myP21CIXqwv5E4Fzy9ushRJi3G2DCjOukyxW2wueq0Pat1nl5OtodpNJrJpc1Oo Pl3A==; dara=google.com ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=WSHV1RAv; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2613::600 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on20600.outbound.protection.outlook.com. [2a01:111:f403:2613::600]) by gmr-mx.google.com with ESMTPS id 71dfb90a1353d-4f33dbb884fsi280870e0c.4.2024.07.12.08.23.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jul 2024 08:23:23 -0700 (PDT) Received-SPF: pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2613::600 as permitted sender) client-ip=2a01:111:f403:2613::600; ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Punb8b88MgeC5KqQx8etdRy85R8dFdZmnsEX0syC2moHZDfLTiSZRQQ9JehuFBEY/BZ0kBjGe46I8H9NdBimglEOGFFSH5my/VXFVvVPqHoWjAG6Y90C9juGHmrFZa/H+pV14GCPUUHgU2mW3XZydj4p4RIMaL8S9OBe1VDqP61n871M6xJ97j4OgJ6BfugNNC/IugPRSJHtOp2MgKkFX1N6bbpvFjIo8y/gsq7TONiDxttXzbeNTBRYfx7dE7RSuXAK5tKBGYLHmWktCaHhBch1WKV8rdokPmUV63ERDH82DWEUQvGRTJI16o7IzhqxTrZkmRSSMw6aAxjSJ2au6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VMaeGD6Q5TkEwavN5DFy8NeVFjwz/ANkbd3ZMa5/bhA=; b=Q3Mbybexzqpnf1YXLfpYBgw0QtZmVbyKOwg/xwDRzFcTPvd4aOFeTmeIO0UUwd5MPCXdztH/p/aRwKKTCSTCkwM5BECv2f8R+X0ZZRzbUkJPlSDMZHdh6IXENPi8EDo1XGuUVEqunv6M5ONO4E+Jh7qaO368CjKismLCMlBAviS5XwR6qg71HZ6Mk57R2dh7h5pjmqHqMB99EhGV0P+RJw4oGPBBceaUvEuxvvBUQiqCaw82Eb5R6k95ik6GGJst5G9sR5SVmzmZck5aTfeI3s3HJDJoUQtr5USiJr7kfvvuCXSeA11Zy1lXDRp4coIJ0PhXC7WGhef0tgiy/gGrqg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 217.111.95.7) smtp.rcpttodomain=googlegroups.com smtp.mailfrom=arri.de; dmarc=fail (p=none sp=none pct=100) action=none header.from=arri.de; dkim=none (message not signed); arc=none (0) Received: from DB7PR02CA0035.eurprd02.prod.outlook.com (2603:10a6:10:52::48) by AM0PR07MB6369.eurprd07.prod.outlook.com (2603:10a6:20b:152::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.8; Fri, 12 Jul 2024 15:23:21 +0000 Received: from DB5PEPF00014B92.eurprd02.prod.outlook.com (2603:10a6:10:52:cafe::81) by DB7PR02CA0035.outlook.office365.com (2603:10a6:10:52::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.23 via Frontend Transport; Fri, 12 Jul 2024 15:23:21 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 217.111.95.7) smtp.mailfrom=arri.de; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=arri.de; Received-SPF: Fail (protection.outlook.com: domain of arri.de does not designate 217.111.95.7 as permitted sender) receiver=protection.outlook.com; client-ip=217.111.95.7; helo=mta.arri.de; Received: from mta.arri.de (217.111.95.7) by DB5PEPF00014B92.mail.protection.outlook.com (10.167.8.230) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.17 via Frontend Transport; Fri, 12 Jul 2024 15:23:21 +0000 Received: from N9W6SW14.arri.de (192.168.54.130) by mta.arri.de (10.10.18.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.34; Fri, 12 Jul 2024 17:23:20 +0200 From: Christian Eggers To: CC: Christian Eggers Subject: [swupdate] [PATCH v2 01/10] parser: field_type_t::TYPE_STRING: remove Date: Fri, 12 Jul 2024 17:22:44 +0200 Message-ID: <20240712152253.3702-2-ceggers@arri.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240712152253.3702-1-ceggers@arri.de> References: <20240712152253.3702-1-ceggers@arri.de> MIME-Version: 1.0 X-Originating-IP: [192.168.54.130] X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB5PEPF00014B92:EE_|AM0PR07MB6369:EE_ X-MS-Office365-Filtering-Correlation-Id: d8d5ddd1-3b95-450f-ac27-08dca286906d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|1800799024|376014|82310400026; X-Microsoft-Antispam-Message-Info: LJESXGgDOg3OVOZ6ld5lLzo6ENw2zeHYAA+Zui27fPe6HzGLlpW1LhCshDmz/2i3/WX3zvWds2VJjotOQD4cU+3KfsNOCPWJ7Cxnt9r0lASZJo90b1JUZwIxZj661LJbyOQ03RBbO6mzOeWMNxgHG9+9QaUIaHJ/icxH5QwgxofjtsfSeY+JoYvOxRfYzLA3+GB/v8uFl1I+zLZXS6I1TesSQ06HC+Qbhsk/wMUOZdIbH2FxRHfT7aH74DZ6TRASRwLV/iGNqJVTaGkIdC9nxCnYuLu2tSxQSj1J8eYWmSSvjRiLnhraU4E6csdBY7UitXxc82RRYKS9q+Mh/OFw1NmLkRaYKfXlVAgMSVjJroBBhIp7fh9PktaqHbJPXCF8lgbcwOFTK8mdqnTV0WaUTbC6uRrO2+lYJGeFTz/c9qmnS+kTmoaHVtqsb2bffPTIuURa0ZT1iOS+HrzwtCDS9QcAvr0bKgz5116PvbtiIKrxvcd9iwUfwQqn7jp//QdiI+42ztxFXs33DVVp7i5E6sak/xYN6RVG19ORdoSxVdwmCN7TjuVfud1VFYO2GyVIkUJ4zL0okijs+T9gSAjhtIVcKfxQDCuTGISJcvNoSbzGUCDtLjK/IisaECYhxYrjJQE4u0WeCFL9LALaoSJMvQiODc2nmZJwm2RihmYW0oVxmy/tQwxWerAKP6ggZSIIkCjv54CDCLpVtIhvY8umRxBrnnRDhCTC78utdx+MhZJ9iCdQMt+Q3fqWH5cePSiKH7iSVCdGJXxUGYNj0YEGOwXbjxgq8CQTl6ANLPylmPOvBDuzd4EAfVuJQl/gyzybJIXtE9Vdo1NMF5QMsxFOGqeDOW0Djh9jB+m53aNvw7XACMgqdLeKTnXMHjy2o5IP4gHjQ/SFvCYTn2HNS7dpWKag9DIbPxVMeX6qDui1eZN0jj0ZW3UTtkjGNSz0Dd+bGOpw5Q5SIaBM/F3qPeMUQqWOMs/KQZkDEYMrnvkCWFpWu8j88qCA4Whlo6CYjruhM83X5SVhzU3eas/hwMsk8ssX+uDaNuAlJ1NuxZdbJ01ZsWXsQ7sq9/BYp0g3hVuMAo46kPFx+X89DftEwziGBfeOK7etGRIAoO3+oA5i0vMHbKjklG65fo6MS+6BvRF2Whn+tnfem1HxVXekecX36LYmKHd0FHq7xThH6Ho4/OlUFDWBnJGZmphrGPhsdd9Qq6KSu2KWrYWs3Ugd3wTyBWcR8U+00WAG1XlChi7SpjnJJBQLvIoX+Yk7NXdU7I3TvFJNTB6VOGKWQL2jn9eqhybRenC7l7vhbsCftf7TBjhZMA9DJUUhEZW9+6oOwYT4hS5dUKNiRfeSbX4AOJFV2hghOldn0/ETQxk+hnPaHyFxZAsLDXI307nC1NWbD6gvswJbMWGGkcNmmIjetq4jNFj69xZKaooCHn3XU6xN+QU8DH0nI/ktRxZizOko72pM X-Forefront-Antispam-Report: CIP:217.111.95.7;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mta.arri.de;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700013)(1800799024)(376014)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: arri.de X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 15:23:21.1566 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d8d5ddd1-3b95-450f-ac27-08dca286906d X-MS-Exchange-CrossTenant-Id: e6a73a5a-614d-4c51-b3e3-53b660a9433a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e6a73a5a-614d-4c51-b3e3-53b660a9433a;Ip=[217.111.95.7];Helo=[mta.arri.de] X-MS-Exchange-CrossTenant-AuthSource: DB5PEPF00014B92.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR07MB6369 X-Original-Sender: ceggers@arri.de X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=WSHV1RAv; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2613::600 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , This isn't used anywhere (GET_FIELD_STRING() uses a separate method for retrieving strings). Get rid of dangerous strcpy() call in json parser. Signed-off-by: Christian Eggers Acked-by: Stefano Babic --- corelib/parsing_library_libconfig.c | 5 ----- corelib/parsing_library_libjson.c | 5 ----- include/parselib.h | 1 - 3 files changed, 11 deletions(-) diff --git a/corelib/parsing_library_libconfig.c b/corelib/parsing_library_libconfig.c index ddb79f6fb152..a3535e9ec0e4 100644 --- a/corelib/parsing_library_libconfig.c +++ b/corelib/parsing_library_libconfig.c @@ -27,8 +27,6 @@ static unsigned int map_field_type(field_type_t type) return CONFIG_TYPE_INT; case TYPE_INT64: return CONFIG_TYPE_INT64; - case TYPE_STRING: - return CONFIG_TYPE_STRING; case TYPE_BOOL: return CONFIG_TYPE_BOOL; case TYPE_FLOAT: @@ -51,9 +49,6 @@ static void get_value_libconfig(const config_setting_t *e, void *dest, field_typ case CONFIG_TYPE_INT64: *(long long *)dest = config_setting_get_int64(e); break; - case CONFIG_TYPE_STRING: - dest = (void *)config_setting_get_string(e); - break; case CONFIG_TYPE_BOOL: *(bool *)dest = config_setting_get_bool(e); break; diff --git a/corelib/parsing_library_libjson.c b/corelib/parsing_library_libjson.c index 4728d200fc8e..86646676d419 100644 --- a/corelib/parsing_library_libjson.c +++ b/corelib/parsing_library_libjson.c @@ -28,8 +28,6 @@ static json_type map_field_type(field_type_t type) case TYPE_INT: case TYPE_INT64: return json_type_int; - case TYPE_STRING: - return json_type_string; case TYPE_BOOL: return json_type_boolean; case TYPE_FLOAT: @@ -133,9 +131,6 @@ static void get_value_json(json_object *e, void *dest, field_type_t expected_typ case json_type_int: *(unsigned int *)dest = json_object_get_int(e); break; - case json_type_string: - strcpy(dest, json_object_get_string(e)); - break; case json_type_double: *(double *)dest = json_object_get_double(e); break; diff --git a/include/parselib.h b/include/parselib.h index 99b6519fa480..b0142ff26840 100644 --- a/include/parselib.h +++ b/include/parselib.h @@ -27,7 +27,6 @@ typedef enum { typedef enum { TYPE_INT, TYPE_INT64, - TYPE_STRING, TYPE_BOOL, TYPE_FLOAT } field_type_t; From patchwork Fri Jul 12 15:22:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Eggers X-Patchwork-Id: 1959933 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20230601 header.b=MI1+HPjQ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::d3c; helo=mail-io1-xd3c.google.com; envelope-from=swupdate+bncbdk7hq7yrekrb44uyw2amgqee55nv5a@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-io1-xd3c.google.com (mail-io1-xd3c.google.com [IPv6:2607:f8b0:4864:20::d3c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WLFjg281kz1xqy for ; Sat, 13 Jul 2024 01:23:35 +1000 (AEST) Received: by mail-io1-xd3c.google.com with SMTP id ca18e2360f4ac-803bafb0b2esf225868139f.0 for ; Fri, 12 Jul 2024 08:23:35 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1720797812; cv=pass; d=google.com; s=arc-20160816; b=FJqQUrdZWb+u8ko5/Rv7p+XvNhVlYbQKn1NTDQE6AvekttdMTxJ48fSyzce4lpuxPN 59fKxfZ+liGObjOC6LKNF/tgurfk+VRk3xZO3BZmigdoo4h4V0/BQI3rw4tt1ykpVokj EQ3yhnvZdnuS9RAWCWLh2ADz+XTy9UaQW1tF2CRpR1Hvwh4oS1KPD7wRGdxjj6n5brpp ZlsluzyM+ACVoqgEmHwNsa74brGm+mRjWpk0LcC0vBRUO0Q2PzsOhkdj0VrfS6Zqs7qW MFuq3YeH2BD+YeULOdBBzGQ43AY5+ADlCajaFAg6I/89ileamdkgnTjnfPRz/D6beCQV p7zA== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=se332SF58WnAuJALMcOkhVDjTi5kE6pXuOd/EMrPYTk=; fh=KEDkp2ML6y5sNe4QNXNwJ4l6x0pLxbVs7sx4Vl6iDbk=; b=KYW7crjE0oXJwar/B8qteEUwWsYwrA6UMfpzglO/y31v478zH3ONIGbK2/l02krvn/ AnMvTGR0vJeZCSEbjO57JPMJsdqe6sbfr1j4ydjq0lkZ9vfVKArxaNA/PUa8MsQxIaNx 1j8zQIIra2+gS99pvYgzDj4A8chgkvH11gcUMBdk2C+v7wxh7JZ1mY0KFI2oLN/pTVfz Fg9zoIaEXkaawcs1sJaXfw6UGvQSY6CV94jHRJBoCh0ol0qP1HWCCUnNHP97MxQYLMF4 ROW7AsFtPmhemG0Z4D2RRX6s58zGJDWpk/LPpUxLqdutovs253IFLKNoDnU+HAQKIx7t axDw==; darn=patchwork.ozlabs.org ARC-Authentication-Results: i=3; gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=hWFivHQP; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:260c::621 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1720797812; x=1721402612; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=se332SF58WnAuJALMcOkhVDjTi5kE6pXuOd/EMrPYTk=; b=MI1+HPjQi6gBAXITftuaeuHBaN7iUCqpj4X2kCyKOanMh73vnZMX9gq3eykMwJgGV4 5ERHj+yYTqOd6l1YNK7o9y74/RFQ9GG5tzBjFjT34QUJL7hHQTVW7D017r7WRTr0cTRk EUr0rdpO7pTnkQqxut2+Lsc0vxXZpli8z+Hyj1uhUFv9iuOtKPlqFaSs7anw1YNZnnM2 bmVH6kYsi5UKXclaYtukb9u8ZJLuX9/5mBZbS106nFin2XpSkJLS4MdDL6aSq9u54tsp F1TGoSmOuLN1XkN3HmRN87sgkyojz3SWnHo+oiFOr7enVoAMoH8JYeZ04dLU+4O6QOZh V4KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720797812; x=1721402612; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=se332SF58WnAuJALMcOkhVDjTi5kE6pXuOd/EMrPYTk=; b=QojWmOgjTCJlEtP7UmrPftSXM3nUZe2a69XNpYnRS+/vJXWBFynfpIFbAuERnKZbw7 vVbek7ScVRQa/058X9x2A2irRtfgE0GZMQjWg57ug4kLDGyChWKY3IqlQpR+NmX1UD+a Xv9tXX4rYLCgm/A3FzF3vLgGOW37VAFX+Bs4BmlTG8yTEAuGNKrFnZqP2hfxQS3CJchk ecxQvNFhjm3V27OLOM36jI6XBbd7PnRv2XkQlqNUIHU015q+koeGLZVsyE55pWH3W16x IAr7NDdXlPnL9VsLzPwmejLfRsXnJW33aG0ctKXP4/5MRct8kqZf8oIpXGbX0lU+6Fgf mzMA== Sender: swupdate@googlegroups.com X-Forwarded-Encrypted: i=3; AJvYcCXaw+k1fsiRpHs6gEuMJXjsp/zE1fEJEavOB0tQ9N3ZBmRLJQOFFjIUyOXmVQa9mnh2IgNH0mmyI1AUkyFKDR6R5WyjZgEio6zQY0EvMA== X-Gm-Message-State: AOJu0YxgVo71golcwtvMHZqWV2BGs04js9wjdKqJ7MrXrA4KDvubxlmG ILs8UN3oBnei5+aJ3PpaH/iRlzwAf39FBfZ4D0rjQeoIGk39TqoY X-Google-Smtp-Source: AGHT+IEQcwyFZHnTAYKCEPqnQ/jVXIUjlt64B1uP3zCNdMeg4nBxRxro/7zy1gM9OJbQM0QKjy9jxA== X-Received: by 2002:a05:6e02:188b:b0:375:8fa1:529a with SMTP id e9e14a558f8ab-38a57401adbmr155460465ab.10.1720797811881; Fri, 12 Jul 2024 08:23:31 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:6e02:1d95:b0:375:a4ed:3509 with SMTP id e9e14a558f8ab-38d2266e3eals17129025ab.2.-pod-prod-03-us; Fri, 12 Jul 2024 08:23:30 -0700 (PDT) X-Received: by 2002:a05:6e02:170c:b0:376:2934:f570 with SMTP id e9e14a558f8ab-38a5740191fmr147478895ab.9.1720797810613; Fri, 12 Jul 2024 08:23:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1720797810; cv=pass; d=google.com; s=arc-20160816; b=iNZ9URVm1r4W0chXvvdYe3yCi2m0D2wcNK4/21BwcXHV2FaPTeVFsGv3MOEUn8pCrN aN7Hv0FZk/FDFv9P6L9YxOHwMyp0Dm/mTmKB4StUFDlXfG/E2PEBskKhJBqewX0YAoTZ S2Q02YkCjikjVcnfnWn5XLEY728z+ySQUDSi0RZubmKdK28MPQ+e4dleAQP4Wd7Or7s1 gS/pI40sSjf75mR1MhJZRUqQCY9nd8n9kMuH6QqPqFkeiaWWLV0xCqjanlni4q7X9HRp wJp63RZrb78PA1rfWNnmuXl36M59IGf1zhWzxkRVH2uLHP0kn/waKIn//76sgtZlnqj0 dVKg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=K7526JUEoSfhOFoxfBvUAK5OsTBfo+j3eMla4gxjShM=; fh=Zaas7zo9QAZR51NXyZEDKjGEOyAL/jH6m/nrwgSdorI=; b=V61R9FJ3B8Lp2PF2pVAJDyea1cu83VxDP3mS7wq+6jP5RteHIEIkl3sTxc4kz3UfFp RAVRI/gq8zYsXhHJwytgabWZ5l3cOZOW72/KxiIEfyg93z1D3Zqx40TLo+w8O2zXHZxJ JK+RKht7pOt9J1tVbMzcMdoYzskI/wC7OeRicUgS9Mzb8WnYZn1/WsfXWbkjR2Frby0D o698HL/4IOzwidnhKWtKgFAjtyDPyAmy791nExEZp3ZnrfXLAdjMR6k8ksbjgSfw170X eo6EhaxopXyez3bn2OnhAzVarFo3nre9J7nB29g3y8ptmrFABEzTpise5pkq8RrQf6La UkLA==; dara=google.com ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=hWFivHQP; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:260c::621 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03on20621.outbound.protection.outlook.com. [2a01:111:f403:260c::621]) by gmr-mx.google.com with ESMTPS id e9e14a558f8ab-38a49265fd0si3555785ab.2.2024.07.12.08.23.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jul 2024 08:23:29 -0700 (PDT) Received-SPF: pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:260c::621 as permitted sender) client-ip=2a01:111:f403:260c::621; ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KDlM2ns1qkS4+fX9PX2k3DtbBIFHLA4vtWCGKhtqlQdLOKp/eM6H6tpMNrqtuMgXV+QTCkMtU2KBQ2endsd+DgyEgSdTazJ581HSozKcazXXuItbWKmMKIOhYaTsdTmzHwaA3wrmYG9W/APlIh6A7cUUouQKyx2TA/+H5ZyGZTTj3NEXyAkAYNMgrxQr7OnY3+CAxfgpzNF6KFP6wvKDs6TyvDhDzkcdF9c5Kq7bShj6uGFVbWk1nc1w01Qs2VZvJKdiR2nVyqrUif0cfwtZ+GBVPx78XhjjzGOcDIPOuFay47+hXOcl/MxkAVntgR4lcIFgZvm8gnIcuSkdXL+5vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=K7526JUEoSfhOFoxfBvUAK5OsTBfo+j3eMla4gxjShM=; b=NBzkUhOSHxWDyTPzaKKONyHuIYh5HdrMOhO1tbRa8rZ/a3KRT4StPccKhUwuwoHn4elOxu+P8SP5W8+3jMlN4S2aq0r2+gz3zbdJNJPXaIv6Qb2T1ymICIEGEpGjZH3IfhqQcNHg8JdRzgiJwI17DoRxlhIDXHI0in5XhK+fKahFNvkPGKStA2QV9pUj3a663KsFlLfUx8Hr10gh0QG+KLRgLgT2FOF52hWAPCNsVQAuELOiiTSIXeiEDEUO5mDF7ZbYdVJDkiyvCSIsF/NdmV0Wl0wCD7hStXXov5minTLJR/uTitVcIbQ1VrbdoGF6rLjFuKxeUmUG6rnp1l/VRA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 217.111.95.7) smtp.rcpttodomain=googlegroups.com smtp.mailfrom=arri.de; dmarc=fail (p=none sp=none pct=100) action=none header.from=arri.de; dkim=none (message not signed); arc=none (0) Received: from DU6P191CA0065.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:53e::27) by DU0PR07MB8417.eurprd07.prod.outlook.com (2603:10a6:10:351::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.19; Fri, 12 Jul 2024 15:23:26 +0000 Received: from DB5PEPF00014B93.eurprd02.prod.outlook.com (2603:10a6:10:53e:cafe::9a) by DU6P191CA0065.outlook.office365.com (2603:10a6:10:53e::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.23 via Frontend Transport; Fri, 12 Jul 2024 15:23:26 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 217.111.95.7) smtp.mailfrom=arri.de; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=arri.de; Received-SPF: Fail (protection.outlook.com: domain of arri.de does not designate 217.111.95.7 as permitted sender) receiver=protection.outlook.com; client-ip=217.111.95.7; helo=mta.arri.de; Received: from mta.arri.de (217.111.95.7) by DB5PEPF00014B93.mail.protection.outlook.com (10.167.8.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.17 via Frontend Transport; Fri, 12 Jul 2024 15:23:26 +0000 Received: from N9W6SW14.arri.de (192.168.54.130) by mta.arri.de (10.10.18.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.34; Fri, 12 Jul 2024 17:23:25 +0200 From: Christian Eggers To: CC: Christian Eggers Subject: [swupdate] [PATCH v2 02/10] parser: field_type_t::TYPE_FLOAT: rename to TYPE_DOUBLE Date: Fri, 12 Jul 2024 17:22:45 +0200 Message-ID: <20240712152253.3702-3-ceggers@arri.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240712152253.3702-1-ceggers@arri.de> References: <20240712152253.3702-1-ceggers@arri.de> MIME-Version: 1.0 X-Originating-IP: [192.168.54.130] X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB5PEPF00014B93:EE_|DU0PR07MB8417:EE_ X-MS-Office365-Filtering-Correlation-Id: 0e5de9a8-d0dd-4355-df7f-08dca2869362 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: L0zksdMXJVVMeKxmqwJNU7vqHkPofh9i8ojWMCtGJxYr13E9OTmeGxeIucPU/y6nmv9Lwn7fRvVyogohlUkC00Iz/+mDPe1pfbkkXEBcCjqTHZQFVHT5CxS2yHJDqus6poDEhPMGxjNid3q4lwSfUq9L3M/fkafR6easBXCmlpKYT9h88KWrhuBqFapGViTAUkwU66boLt12QIkmWrFTz9re7dEO5QLoxjOgmVeLSOQXOWDZjF8DfJy7YCXVKcszO+puRZQ2eQXruA5Cy3q089E9mE3NFntwa8UCnTRrerXE6+xfTaBG3z8DhnFHudXybzQHqqfCfv4ky/kqMM0LIC4OnkRLMhEcmCJa0s/Ajn2Z/zC6f8txXibwBeApdskvx1DTPjiC2m2RZqIW34pcGcdE8wwdVRDvrg+iV9VoAQrsMJ7FbodRrc2LR+cXWw1nu9oLrk6WvR7q/aDAiGE2pHeISm4q9W/5oURKbsT3lcaqJsWWGpGxFa0F4agnYywrdHUUqMN5FHTfLoQKGXLMyBxoRGzT0Ggii6Wq6YaS7Ulx04NbC9VtmiXpClBbpjgXbI4jKCsiJjWZJneZMV5HasSo7xFgqiRRoNyZUd6gMeFKUAsh9oGluGJHhC1jtuSjqWDqN03bCmnhddHFHRljUZvklNb6UtUiiDJb+iKxMp0Q9GZr5umC0bCTei5IEeahGINmd5gQ/jJr08v/AlaRKJbwhAeJ/qT2I4Aa/20hzZs/OGkrFqpePxcZzCOdc4mzdrVRuEiSjggS4gb0KtBQCKokr5b3wpOg5zau5J0oCcY4aygAK+FKEemprCZ06BbR9aNCb9nhX7dynsmzAsNT1WYsTltsryMrBr4A4zNqhT07cxszrQhW1wt5WdgsSbZXiBGPT54J0Zc6UOe/wxtU8uGzwK+52Toptye03ORMS+S4Op2p63xmHe/CgLQ2N2FBHS2vgU1meSDNIquOs0ga+geHCd0Xifelxy5azm77BuLXoRAGPQQ4PYjlGWJa1fHHtonrqUicPpRJhti8oLjzyvOAz4l6yCRP+8LLkr6EzFh8FNoiUWd4RQrxfasZajCZtwUdgHLNFyb6uAJSQfAFM0AAnkXgPbIOn5JC3fq0X5w6dlvW9MsntSV1rRhfZxwRwuqeBPWVzVHGxNrAv+RAGHnjWVSCoW3XXe9lN0ZADz3DiHX8YsosLWrejbTsxac4tfT+QuU2nMUahGymCBKJLjhN6nQjxVu8AcDGM1cTvQBiDnZ1Me76TwUNaF6rM7YtDHT2Aa1icbgQR5S7YDUvXsdoBY+csz/buvHwrx0CMX2YWYkyL0L+rZQ6hQzWCVsgCLXAScjeNc1PrNrR3XrVcylRblqLaIOqNGV7xGXwcJEBurVbMooQj+yQFuIOP5zMUMS4JXRoUdUGomwc9qvjqhCl/QVQQ2NYAI17dK5CE3S6+z+HgqqZ6vulOJE400pl X-Forefront-Antispam-Report: CIP:217.111.95.7;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mta.arri.de;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(1800799024)(36860700013)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: arri.de X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 15:23:26.1190 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0e5de9a8-d0dd-4355-df7f-08dca2869362 X-MS-Exchange-CrossTenant-Id: e6a73a5a-614d-4c51-b3e3-53b660a9433a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e6a73a5a-614d-4c51-b3e3-53b660a9433a;Ip=[217.111.95.7];Helo=[mta.arri.de] X-MS-Exchange-CrossTenant-AuthSource: DB5PEPF00014B93.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR07MB8417 X-Original-Sender: ceggers@arri.de X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=hWFivHQP; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:260c::621 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , The libconfig/libjson adapters use "casts to double pointer" in this case, so lets name it DOUBLE rather than FLOAT. Signed-off-by: Christian Eggers Acked-by: Stefano Babic --- corelib/parsing_library_libconfig.c | 2 +- corelib/parsing_library_libjson.c | 2 +- include/parselib.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/corelib/parsing_library_libconfig.c b/corelib/parsing_library_libconfig.c index a3535e9ec0e4..ea4b03a476f5 100644 --- a/corelib/parsing_library_libconfig.c +++ b/corelib/parsing_library_libconfig.c @@ -29,7 +29,7 @@ static unsigned int map_field_type(field_type_t type) return CONFIG_TYPE_INT64; case TYPE_BOOL: return CONFIG_TYPE_BOOL; - case TYPE_FLOAT: + case TYPE_DOUBLE: return CONFIG_TYPE_FLOAT; default: /* not supported in SWUpdate */ return CONFIG_TYPE_NONE; diff --git a/corelib/parsing_library_libjson.c b/corelib/parsing_library_libjson.c index 86646676d419..187e4eadcc16 100644 --- a/corelib/parsing_library_libjson.c +++ b/corelib/parsing_library_libjson.c @@ -30,7 +30,7 @@ static json_type map_field_type(field_type_t type) return json_type_int; case TYPE_BOOL: return json_type_boolean; - case TYPE_FLOAT: + case TYPE_DOUBLE: return json_type_double; default: /* not supported in SWUpdate */ return json_type_null; diff --git a/include/parselib.h b/include/parselib.h index b0142ff26840..4a8717e0aad2 100644 --- a/include/parselib.h +++ b/include/parselib.h @@ -28,7 +28,7 @@ typedef enum { TYPE_INT, TYPE_INT64, TYPE_BOOL, - TYPE_FLOAT + TYPE_DOUBLE } field_type_t; typedef void (*iterate_callback)(const char *name, const char *value, From patchwork Fri Jul 12 15:22:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Eggers X-Patchwork-Id: 1959935 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20230601 header.b=KwrktK6e; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::840; helo=mail-qt1-x840.google.com; envelope-from=swupdate+bncbdk7hq7yrekrbemvyw2amgqezgpc5yq@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-qt1-x840.google.com (mail-qt1-x840.google.com [IPv6:2607:f8b0:4864:20::840]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WLFkF3Ytsz1xqj for ; Sat, 13 Jul 2024 01:24:05 +1000 (AEST) Received: by mail-qt1-x840.google.com with SMTP id d75a77b69052e-44b181a4edasf52511621cf.1 for ; Fri, 12 Jul 2024 08:24:05 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1720797843; cv=pass; d=google.com; s=arc-20160816; b=gIxadsIkSxwv+DRTwp1JI4blLWBm8i7fdLq0JxiEA4NkQDxoF+JmT4heNK7ZkczggH EUDRJu3qabmGp791jJu+qDJMrF5eMw0UGVqJ7mdqQbbU8k+9cvenau/HUHCcbajdkwHq fojBFRY/fsHI1fZGSOwDi0NX9p4c3rqtcZqwEcARMaUrCXICgJCqAr6aBpXO+ZCpKnve G7quLovw7fa51JeuKjllXq0wMfWpxqIKR2zwv32mG6bmTUovNU9RE0Ml9lQSNHNjUsDt 177Z9vqodiKFnu0cbVpW/OhoHx16z+ZnaoibERW9BRAf1LYRwK7JVnycvlHvyv8XAU/r P60Q== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=mkBjEmGXgI0xp7jh4tlnewJ5Pic5d86c2LoSH5RKjlI=; fh=Ib2878n6U9fJWLR9RFgjhxe/0JnSxxVF056NmvpBX4s=; b=CQrG/a281wFLefJB1AeUYmcp8U7gTqip0r2n+PRaMppxWF3ENHr9V+mxTC+283z0SF soyqfYGnK8XL/9ELiEtTSHkHTo3m2fYl9l63GtLKh+Xg/5sKW8bQlC9/op/HOnBD2R0J ieOhKEwJIFIH6tB2OqGEiZGl+wF/pjQKXEYMdz9hyruHD2Kc2KDJU/TQR0ngn2QvRZt3 GU3j0KPUp+tiCU7DzXGN9ndNJGATwIEpemf0uIHkLCSgOfIOHKYfY4fUYJ2hRNZlWqR9 v7krTiXCks+1LBp9Q58m2uKf71QxV3ouv4vZrt/fxki9IjDN4fpyBABsn0K74bnZDKhQ EBCw==; darn=patchwork.ozlabs.org ARC-Authentication-Results: i=3; gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=HmKrri9u; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:260c::623 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1720797843; x=1721402643; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=mkBjEmGXgI0xp7jh4tlnewJ5Pic5d86c2LoSH5RKjlI=; b=KwrktK6eVnntugaenJXyamrW1fVkS9nI0MN+DSHbf6zEAVLHlg/iSRVwxYWN8708dg ECYNM0fZSLi22Do7/a/uURKuY7jsh/+a1UKgPsIwJRe+a8Z6KcOoQ9+BIrJbzsGLFKoX LnkqReFhQq5xUmGqQcTrdLNtplPtTmMJM9i85yaU6PLMvWvPcTrKP8fxt0Uzyz8hQy5G Aa4E/RPeI/evaNK5Q5cEroGXT5R3+hmkH8HkY5mcG/yfwzLYJV9yGKFgpqm2se60oZt7 +ExqdAWiNPOm9BdT7R+cw5abBLlserbCBrfz72KRDaLOQMTqUqCL1FBKhjo8zFt2OnDT jhMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720797843; x=1721402643; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=mkBjEmGXgI0xp7jh4tlnewJ5Pic5d86c2LoSH5RKjlI=; b=VnmlT5Bbk887wqARUpaah2YfkFbNRty2rJVDKgxTrkaKuk7W9ab3fj+QZQS/Drf2Fl /ihmQiVQGC1FbshLnPpUrZK9YH2erzom69OOvmZ3+fdFoRv4z5RpFpIbkVE9eya2wfNk X0Wbxi6AM0VGuD+sdVsORs1meLt+bRpJLwXJKzO5Rx4McEEW4COkzTiwYSJpTQB/C0xS tUFENIxRvjrZiUOnIwzVgoYz3UiZn5i05q2ANCRM4RRUl/5+nKq3DOZNNr6Gf9kadiYo a3iTg7mWzOsbkCuaYCEnk9/b/OLR+FNgAcCzzkG+QsGikTHP+StNeFGP9gnnfDnlWq3V OhlQ== Sender: swupdate@googlegroups.com X-Forwarded-Encrypted: i=3; AJvYcCW9AGzeuDUEzDZF/E3Q3cm8yg3tPHKS+AM2iDOgWQMqjkf9IMrNX3E0M4OpMTgrM3zsDMf8prqWjSNyWJb1Fmc2ckWFK0IsfDvdnVzGkA== X-Gm-Message-State: AOJu0Yw4Za3ImIOK/BDIBQnvsnrcYpfY7YDTAsbWZ57WZg0ZpuL4FNCb p6mE5ZqEqH9SjcA0ZoxDlL57M5gmX8k3SBTCLUAlcPMqMHTxzOtV X-Google-Smtp-Source: AGHT+IFhBxETZPrGyd5CHZa54CpLMy66rDMqJ72qgE9zaSjgsds0OtD71OocD1r1D3cv9pebYkbBSw== X-Received: by 2002:a05:6214:5184:b0:6b5:101c:6473 with SMTP id 6a1803df08f44-6b754b6ac34mr61964216d6.2.1720797842430; Fri, 12 Jul 2024 08:24:02 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:ad4:5993:0:b0:6ad:782a:b4d5 with SMTP id 6a1803df08f44-6b74b426bd8ls38112466d6.1.-pod-prod-00-us; Fri, 12 Jul 2024 08:23:59 -0700 (PDT) X-Received: by 2002:a05:6214:c8b:b0:6b5:2de3:32b0 with SMTP id 6a1803df08f44-6b754b9f927mr51301546d6.7.1720797838806; Fri, 12 Jul 2024 08:23:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1720797838; cv=pass; d=google.com; s=arc-20160816; b=HwRyRAGfACg2GjMnk0GpLDOb5ZYc6PHITRmOr6y2XgMEs37Re/i0yz7L9gIl0Xiw91 IGQ+548n3l7NTbu8XOTjoitADUitCHSk+IcLS9ADr65Xh8ImA8RQwYr2VcZv8cXWa5Za B/P8cCeiQr9q+TIC3z4omuGYMeEgr2LQzKn7xMGY3RFYb8r0pOx2Wmc7hz1n3Bwcufvn +q4ZqtzyBdEgP2zBHIV1kw/HYagmkr5Izzj8mtE+aROo873Uv3taKgwUDOFsWnu0oSHH XB6yUbwxqmmYwOpccIhi0DNyt40Eyu6T0FxuHvawhjgRPtFD7YF1gR18BP8lXGvN1q1R bomg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=vgxIwSLwol7LF7kwlp707Z/AbFetMn81q1VY2x641Og=; fh=Zaas7zo9QAZR51NXyZEDKjGEOyAL/jH6m/nrwgSdorI=; b=XSH8e2rFhjfYYcM9+3LQvVC+OdHR1poRwOctaA6iKCM3gZ7JaAaa1yUFVmq4AN+RYd BlcnARfZZBmOwHdYckxu7MafdAwvHKDS8XCBQ8r9tBkuNnZZLUAQOMqC+QAOE/oYo3Hn hpV8TSmm10mVrGeyZULliGUWt41TVAfxszCSoG/vnsvGlNdGtA7RGs2byo0zCuy6mawf 0oeFwVz1sUNQpLbfiBuvys4piyvgoHV9joLBF2EvM1Z6cgZAPpEd1G/GV5U5HccxQ/Ox sKQ1BoR2AqMcdrFsnrfnykndpt99jVTmAQHmpjrjDAISYqH/u1OyfEYeZ9v3wqwAXVGb S6dA==; dara=google.com ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=HmKrri9u; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:260c::623 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03on20623.outbound.protection.outlook.com. [2a01:111:f403:260c::623]) by gmr-mx.google.com with ESMTPS id 6a1803df08f44-6b61b9f388fsi4744366d6.2.2024.07.12.08.23.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jul 2024 08:23:58 -0700 (PDT) Received-SPF: pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:260c::623 as permitted sender) client-ip=2a01:111:f403:260c::623; ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Cla/tz9+eQIAi/JVTXxHrBYkGd/YrS2oPLUfXRzIXaqYiNe8aTQa8VMBHOAf8UC7SfiQX4ZFBvjce7CX1H0KSZ1RvfWwVt//bVgS+w+f28v1CDq/1AGfLd1un5BrF199XX9DWOWUn70dPp/ORuQy+XZZt7KWmXDNe8jGn1tNKAaHJIwPwSi0bQhPBkr7OlLcprz3WCF0qqggDv3NwqeGZd5pkemh7kDc18ZisdBSQy+zzj+9ed7V00VkLT00Hza5y9NkwLTc81JE6y33gYXSolMiylSko1I7rYuiGJOv5YufZqBhzNUcsYdrBLo8qTZFIGb18xaHU0DqzVnBUPP8mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vgxIwSLwol7LF7kwlp707Z/AbFetMn81q1VY2x641Og=; b=KmrMANGbuYDsh8FwvU3mSFrMbflSoZPXW2MmAn+/FGDfrBos1LqJaf7qu/2a8D75V0stLALqSoRUQ2XZFFOjmUeY5XqzNHj7JcJbEExMsBWLxNwh4Z60z1ZuJlcmU1FSjmSMEtVQoajhxWsJSdUr75PhNgM6JU503XOeWP++3oXKl61WAn9HNt0ia9k1tzFusCjUBtqGs8KhySCEq/bCYsE6SyVikwIVyl273TAPIpZKYu7qmodrF0cPORzFvjXUk2S7iy7lujPO1JSju5tjRyLSwWWzbbEMViyzA5YT3bAgCL2e/Xad/UlCHTQJ0Xy3/JnsvJG8oiY7OPRVU2z/yQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 217.111.95.7) smtp.rcpttodomain=googlegroups.com smtp.mailfrom=arri.de; dmarc=fail (p=none sp=none pct=100) action=none header.from=arri.de; dkim=none (message not signed); arc=none (0) Received: from DUZPR01CA0202.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b6::13) by DBBPR07MB7516.eurprd07.prod.outlook.com (2603:10a6:10:1ed::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.8; Fri, 12 Jul 2024 15:23:55 +0000 Received: from DB5PEPF00014B90.eurprd02.prod.outlook.com (2603:10a6:10:4b6:cafe::8c) by DUZPR01CA0202.outlook.office365.com (2603:10a6:10:4b6::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.23 via Frontend Transport; Fri, 12 Jul 2024 15:23:55 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 217.111.95.7) smtp.mailfrom=arri.de; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=arri.de; Received-SPF: Fail (protection.outlook.com: domain of arri.de does not designate 217.111.95.7 as permitted sender) receiver=protection.outlook.com; client-ip=217.111.95.7; helo=mta.arri.de; Received: from mta.arri.de (217.111.95.7) by DB5PEPF00014B90.mail.protection.outlook.com (10.167.8.228) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.17 via Frontend Transport; Fri, 12 Jul 2024 15:23:54 +0000 Received: from N9W6SW14.arri.de (192.168.54.130) by mta.arri.de (10.10.18.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.34; Fri, 12 Jul 2024 17:23:54 +0200 From: Christian Eggers To: CC: Christian Eggers Subject: [swupdate] [PATCH v2 03/10] Fix usage of GET_FIELD_BOOL() Date: Fri, 12 Jul 2024 17:22:46 +0200 Message-ID: <20240712152253.3702-4-ceggers@arri.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240712152253.3702-1-ceggers@arri.de> References: <20240712152253.3702-1-ceggers@arri.de> MIME-Version: 1.0 X-Originating-IP: [192.168.54.130] X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB5PEPF00014B90:EE_|DBBPR07MB7516:EE_ X-MS-Office365-Filtering-Correlation-Id: d5f1b1a9-fd9b-44a7-2eab-08dca286a481 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|1800799024|376014|36860700013; X-Microsoft-Antispam-Message-Info: a4yOlwKU1aao14dKtEXf34bmnNT+1smwnefLU1V53vYxBVDw3i8wOt8RlPEmhcT4RflKILyBhdDiRFRkw9IIweCJatotxhdJAn6vc0K1w9GsqQc7hEIkJSNvFn7wvOWauGvj3woCaIMB8WGMsA9deIYbTV1trpUxTMzXZJiEKLAc8vwnm1s/dRuuRGhQfyjgNXTSBL1J8/w5wbWGPIbpx8HFPeW3JQCE0JeqH+BbjdsipGpcR+VlVy6uVCN2+lfZoHNpWii1er003bJTv9p5wPZJVv99dwYz+OWbXf45PMWuHEkpHmL0Mvu/TnIBgnUf7tHLZQJk+D/dYzZVZ2Ob3DC1dBpMu5fYVF35zhij3zrxLMn+yybzgk0bP6PXQBPkEPOmbsvqtbw6L2CPNBoyzERL14XfuUiY3L0opqVSuEUUe43sCtT6gZZcWNF29lr4Lgmy2YGDKaE+b8zN02JNFnDWJUzW0m/ZRkXsUj7ugfDglhXSPlmJ2W6C7mMLU5MKsEBPD5unBHcnJV2PVZskW9C9tbBVFX23+IhHtmB39MqHTd+VhUxqoYLaCIDF1wJ+Sivzua4rtLSLJZVgRl7qSJ6SUeRWC1S379WNllvVFfJnhqd9QPY30Zs/dsTj5svpoyANmeaCRRiIRcQGW1PfvDhcg1DHd3siAxjy6NTA7Dhm/UoFw47ffky+cymBRJIkRBxHUR8xJfMYZi7xBJMlVg3M1J2MQf/HJYggFKWiLVX/tbUQKR6l+rk+HliC/iKty+f7/f7QZDvOctJ1mUszk2fh7NuaOWuXgR4w9ooHtvsVD9F7Ld9zV9KP1kTU3S2Z5aJr+m5eevAqTnp+Zy3oYn64obmrEGaEw60i1eA9DyChOF5KkYuzGEgDOX6SrgUsWOGd8A/NEWCkvqz42Lw10y2Bk0o5g82BeP74hXprWXsjk9JHTXDuqqRUgqFi1VqSccpXfQXOVAUVP4zJUg+Tgo0NdKVrD8Ur6mS4IuiTWVpw/FucMxMyGnjOZ94YMSPHw+PjEFkN+UItc51UKWi92q4Uh7GEyjhH/Hx6vth2eFdw7AV5NADxIugLS1n2IVi98hFnP3m4MtGxxxoLGJyEKxG8+o0Md9ENV55BrmTHyfv7t/AHNk7u/aAA1s9ygrtzEkpjUMjdjTf0w9Ur/ynmK4Mkb4Clv/soFVh1u7WBsMwP/psTpy7xM3vmOZqkDhlCAV/TZc0AawHkvIymWXia4O/0+LYAGro1QhMbVmEA77RPtgMjSa0oIzSv6U+cBr85lFn2DRoJB4luBfLHDMlvz/hWF+xnfQF3Vu4WhATY76YlIHNhqoLlhl+ZxO/I2CgcKDJAJJ1t2/vfkuZHJdtm0PqJ/gj4skr/hCP2lWEJwf42p+mOP4uXn77rCGDRt4B0j9jh4ClqtiOqBuZbOoizDKUO8yucXyeClaYXq71B80Xk51pVw4HLH/OcwLZPAhJ0 X-Forefront-Antispam-Report: CIP:217.111.95.7;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mta.arri.de;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(1800799024)(376014)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: arri.de X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 15:23:54.8389 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d5f1b1a9-fd9b-44a7-2eab-08dca286a481 X-MS-Exchange-CrossTenant-Id: e6a73a5a-614d-4c51-b3e3-53b660a9433a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e6a73a5a-614d-4c51-b3e3-53b660a9433a;Ip=[217.111.95.7];Helo=[mta.arri.de] X-MS-Exchange-CrossTenant-AuthSource: DB5PEPF00014B90.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR07MB7516 X-Original-Sender: ceggers@arri.de X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=HmKrri9u; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:260c::623 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , GET_FIELD_BOOL(), expects a pointer to a bool value. Synchronize behavior between libconfig and libjson adaptors. Signed-off-by: Christian Eggers --- core/stream_interface.c | 2 +- corelib/parsing_library_libjson.c | 2 +- include/swupdate_image.h | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/stream_interface.c b/core/stream_interface.c index 5f3ad2e3fd93..eecc672ca157 100644 --- a/core/stream_interface.c +++ b/core/stream_interface.c @@ -288,7 +288,7 @@ static int extract_files(int fd, struct swupdate_cfg *software) return -1; } /* Avoid trying to adjust again later */ - part->install_directly = 1; + part->install_directly = true; } } img->fdin = fd; diff --git a/corelib/parsing_library_libjson.c b/corelib/parsing_library_libjson.c index 187e4eadcc16..d454aa79c540 100644 --- a/corelib/parsing_library_libjson.c +++ b/corelib/parsing_library_libjson.c @@ -126,7 +126,7 @@ static void get_value_json(json_object *e, void *dest, field_type_t expected_typ return; switch (type) { case json_type_boolean: - *(unsigned int *)dest = json_object_get_boolean(e); + *(bool *)dest = json_object_get_boolean(e); break; case json_type_int: *(unsigned int *)dest = json_object_get_int(e); diff --git a/include/swupdate_image.h b/include/swupdate_image.h index e214aafc2965..26ace79499ac 100644 --- a/include/swupdate_image.h +++ b/include/swupdate_image.h @@ -32,8 +32,8 @@ typedef enum { struct sw_version { char name[SWUPDATE_GENERAL_STRING_SIZE]; char version[SWUPDATE_GENERAL_STRING_SIZE]; - int install_if_different; - int install_if_higher; + bool install_if_different; + bool install_if_higher; LIST_ENTRY(sw_version) next; }; @@ -57,7 +57,7 @@ struct img_type { bool preserve_attributes; /* whether to preserve attributes in archives */ bool is_encrypted; char ivt_ascii[33]; - int install_directly; + bool install_directly; int is_script; int is_partitioner; struct dict properties; From patchwork Fri Jul 12 15:22:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Eggers X-Patchwork-Id: 1959934 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20230601 header.b=HmbA7NHf; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::b3b; helo=mail-yb1-xb3b.google.com; envelope-from=swupdate+bncbdk7hq7yrekrbeevyw2amgqedqawzyy@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-yb1-xb3b.google.com (mail-yb1-xb3b.google.com [IPv6:2607:f8b0:4864:20::b3b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WLFkD33Jlz1xqj for ; Sat, 13 Jul 2024 01:24:04 +1000 (AEST) Received: by mail-yb1-xb3b.google.com with SMTP id 3f1490d57ef6-e03623b24ddsf4073014276.1 for ; Fri, 12 Jul 2024 08:24:04 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1720797841; cv=pass; d=google.com; s=arc-20160816; b=indckGdq/meG2gxFwHEQI11paFq74QssLqRmOlHIUv6Su8gC4aoZtPNdz6K3F6JKtK ivjrxvLCdGpZN0RVRDClYxzQgMfmOLxl9AlsLgsv+JtMJLA0nHc+V854COKPk3/HiCl3 AFxcyE/EwhzoeqBZcibmgWq9xZQd+YuRQokZ3K8uzqlmkM3F0xpaD1VyjjWbYcMp/lMt PRAm/qqBXhqaUvXH4RiPfkm0iadk7SVNsr4FEjBK6qPPrEG6O6m4/vDhxOof2+TTSXp+ Er9XTseYMkc13A/Py0w95hICWtV5qgV8gW8HWuCxi0pkQLW9c73GnUDgh5PmEV0pQr+F QAAQ== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=XLsHkJqtnUvKkXFF0tlTLJpWrDm5A/ruwdzcD44Krk4=; fh=TpzOMB/EppOB90yLEHfvCVVm8l8NnrAjUX2Upa618KE=; b=knyJo7s+5VlDU4zzTa5x8kFCmL7Rd/vtD83JmKV3tsxdCysgBxU7ilCpLqjrJ+SKlo ucPKM4/gur+Xicd5VPDX6jyj/2JykLAQtNEcSneXT18iQquu90RZiH8v/dwta6bbMHbn JyVZnzEbscZInLZercO5WtiyMyc+BvmsxCEixGFaOIu0/f/FIMeFEep0Wz5oKAIyB9iG PCbHtd9O7eFctpaIHDKSfHZwy3o5pH7544VqCoNIeMP6bSYS5hY1/7eJt8u1UXry0jjv xyx02ajS/wRLIOX6w0qxDv2yfyH/g0wnaPPw3kTLNsKrK5JJryEkV+Lcu0l89M1rto7G bCIA==; darn=patchwork.ozlabs.org ARC-Authentication-Results: i=3; gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=kJVzws67; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2612::60a as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1720797841; x=1721402641; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=XLsHkJqtnUvKkXFF0tlTLJpWrDm5A/ruwdzcD44Krk4=; b=HmbA7NHf5KSs4hrSNGLHUbwpKn1gesXjkrzaN8Skz/penI+Z4h2rl0exNPZa3cxID/ BP6YjpNf25yqpEfpS+JSxjKzlBHt3Azmvmouo54SOj3q34ibU/Yj9e45n/lEs0mkVltD eBcJZOXQSMkzA9B6OFxNYFaE/X7tXGvIXR8evSeRhEGYiy8tOzJZLMlB6lf3yX5YuPEb hLWtJaEnbIQUme+QStf/Ooh7lZ0R62peyfP7jcc7YdRi6thUS9OaIo9nMD/X0PKqEFF+ WekcYgtEYvgCYlMmup0i2XuALeSk+l6zhoWpzknpCblGLXjWbHA8N2K3ivtg7CJXBFgr j8fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720797841; x=1721402641; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=XLsHkJqtnUvKkXFF0tlTLJpWrDm5A/ruwdzcD44Krk4=; b=k3Le0sMhJE1BNn0sLDKVKWK15T8qnPu3ClCaOVvxQK7pgKbPj0Md+b/vTgchiLTpuS l8fLx/5/UfW2DoZyP1H/xWElAN4axAvU88eH7Ovj5JdLo+n2woYsiD+2zQEOSp2NW9QI tDMH1jmOrY8vUcumY5p1Bt3q3aOU3iEUrztKRolrD2AmIPsZIMtKdpqMioX/ecjwDASC XABMNpYXGUWI8kwpq2ANHJNaf/usX34Mmt4H1H1TNCBzpLIp2RuYrhCKOsIN7kFVFSZ0 +13k7cN0FD0rXsF1kC7aa+7mpOCyf9nlu19vcyi9C+31RQ2fKuF2feTTBWj2ezKz9wro zjoQ== Sender: swupdate@googlegroups.com X-Forwarded-Encrypted: i=3; AJvYcCVfp7A7HdFPnwHavGe+WAZYxEURYlRdCaqzVYK/yKOmLxQPIR9Cbz4Vev2pBZsKRYd36pjthBiLEYgvyqA2z2XKHG7GB8FldzSdnCmXvg== X-Gm-Message-State: AOJu0Yy+VHsuI2RcThMXeNSVJ8m5E/d5W34En3ftAKtY8goDGzk+QsJn LnyJerhT54F/cko7f6/T5BQTmBhGYqj+fasvlf9TIo1FXmBcX2z3 X-Google-Smtp-Source: AGHT+IEv7CUWpgrF56ReEmNMqouhy9aacynJMqdn7lc0dSmv6y4asqX7fb9NTPu2HSwTn0KuGeVftg== X-Received: by 2002:a5b:a0e:0:b0:dfb:aee:1d3c with SMTP id 3f1490d57ef6-e041b121ee8mr13607852276.46.1720797841158; Fri, 12 Jul 2024 08:24:01 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:6902:18d2:b0:df4:e17a:8653 with SMTP id 3f1490d57ef6-e0579035fd5ls3197861276.1.-pod-prod-08-us; Fri, 12 Jul 2024 08:23:59 -0700 (PDT) X-Received: by 2002:a81:6982:0:b0:627:a917:bae7 with SMTP id 00721157ae682-658ef43fb82mr122220967b3.30.1720797839609; Fri, 12 Jul 2024 08:23:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1720797839; cv=pass; d=google.com; s=arc-20160816; b=R/bN+gwjpapz/9ad/DtHogwE775yN0XEMKNIFPk8Q9fRgt+FRnUjaQhg/vICuyRDbB ETiTw7bCiXTM3Vgeswo6832j1Te+a9ngjps/oF/L5X1gydACAHhpG38GUNCqrViZsWIl DteEz7+PdrTGF4OqkURz91IoKo74BK/FpFzPEOmA6u7H7aMFNxQi9oUg/joC6KVZ1+X2 SJhEMpgpQ12bkOJWMubbA1353B6amR55up6jEt/apJFQRCFmiwvgCeYPYPOKR8bwddBg GDFQ1ELnpREVvpvoAgFoCQ/9C3b9IrTpnapNCTH0hUwbS2SCzTnXYMy2GPcNgb9kfnCz ndtg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=gJtEj5vQW3M0lZeCfWamg87ufdCQoDDhJOIMi1bWPGI=; fh=Zaas7zo9QAZR51NXyZEDKjGEOyAL/jH6m/nrwgSdorI=; b=ms1E/w33LPflejSCfvr3jK5w3x/dSv8+1qjD29C4WHmSBqISJ1eIvTyh5FZ1f83ale sFrK7lltNXAzMI92jbvC4186SXhWI7QapXpunDLutAao/E8HvsIyokiAkO75S1aDL57N OZkc7N/QYm4aLJcDY7DHwvWsRIo3yxd7ej6yDXsgor4jk/A2UQREpUTY3FvBYvAvsGAU 50+FeygGK4uYHdRdOX6I30wTiuG4NsBCKzFdehuY5n14yzaGnOLXz1I8QNXtMRpl3wWs DEbwbddKPsndjCvm2ZTyfx1kyci00arNdIoQKQfuByGRG0W4kBb32akYrXVUU912lsgY Hy+A==; dara=google.com ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=kJVzws67; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2612::60a as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2060a.outbound.protection.outlook.com. [2a01:111:f403:2612::60a]) by gmr-mx.google.com with ESMTPS id 00721157ae682-658e2049a1esi4554027b3.0.2024.07.12.08.23.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jul 2024 08:23:58 -0700 (PDT) Received-SPF: pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2612::60a as permitted sender) client-ip=2a01:111:f403:2612::60a; ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Y59RKRcJB0SnZotEPzC9KQXxetni65cptjPrsqjm8kFzstRNMajMr1GwA6R97SqWv0zyCnDgxsHFqgpDOkvxGkxa+EKUXYc+DbuzkQT2S3Vdftd1Ij6kkKI+2HDu0/U1kqMuePRKRnetIPZY8gJiuNkYBMMQszq+w7eW3MO9c+pE+gmu6IlJ9NgJYIQTh1izuyeyynBTqt91g89TvLlcskh3HQtLibfYVUSTIEjS8jyvzBh6KOlfZEvR8UZdHjEJb6mRQ1cRjsT+gLxbriLAL9obG5mTP0PZY3owMngcIhEtsL6I1iC8l12XvtClENH+GxlH4PIJ3sPQLWJ1fyBWVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gJtEj5vQW3M0lZeCfWamg87ufdCQoDDhJOIMi1bWPGI=; b=TNt9fEQBhfkx92dck192/evJG99o6uTeNd5f5oRi3HA1mIOPYTUI/g1JNQKccdpSr+7ZV2A0GqYNoN5l72lTJ7ZKZmuRX5EGm79h7O3dFn0qsfkccbYS9359NfPSrmkakTD/oKCLAOfFfdkj/k3ktbzKbFmVP7HmrK0PUQY6DT82X75czvbEDYKDAdBKnT+5cBsvpSGdbRwFF+oJ2UwRbDyOZmDW3YqmtRfeB96t/g1I5ZtVQQmtStD77hbny8szjcBel/E3wHiNezvbRmXYicZYYDsnr7dozN0rIqQ3sFa3hqhZfyS/LETqjxkCB7nCqAQ5O9ZYbB7lr5xzSE3aXg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 217.111.95.7) smtp.rcpttodomain=googlegroups.com smtp.mailfrom=arri.de; dmarc=fail (p=none sp=none pct=100) action=none header.from=arri.de; dkim=none (message not signed); arc=none (0) Received: from DUZPR01CA0005.eurprd01.prod.exchangelabs.com (2603:10a6:10:3c3::9) by PA4PR07MB8741.eurprd07.prod.outlook.com (2603:10a6:102:262::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.8; Fri, 12 Jul 2024 15:23:56 +0000 Received: from DB5PEPF00014B97.eurprd02.prod.outlook.com (2603:10a6:10:3c3:cafe::ee) by DUZPR01CA0005.outlook.office365.com (2603:10a6:10:3c3::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.23 via Frontend Transport; Fri, 12 Jul 2024 15:23:56 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 217.111.95.7) smtp.mailfrom=arri.de; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=arri.de; Received-SPF: Fail (protection.outlook.com: domain of arri.de does not designate 217.111.95.7 as permitted sender) receiver=protection.outlook.com; client-ip=217.111.95.7; helo=mta.arri.de; Received: from mta.arri.de (217.111.95.7) by DB5PEPF00014B97.mail.protection.outlook.com (10.167.8.235) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.17 via Frontend Transport; Fri, 12 Jul 2024 15:23:56 +0000 Received: from N9W6SW14.arri.de (192.168.54.130) by mta.arri.de (10.10.18.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.34; Fri, 12 Jul 2024 17:23:55 +0200 From: Christian Eggers To: CC: Christian Eggers Subject: [swupdate] [PATCH v2 04/10] Fix usage of GET_FIELD_INT() Date: Fri, 12 Jul 2024 17:22:47 +0200 Message-ID: <20240712152253.3702-5-ceggers@arri.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240712152253.3702-1-ceggers@arri.de> References: <20240712152253.3702-1-ceggers@arri.de> MIME-Version: 1.0 X-Originating-IP: [192.168.54.130] X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB5PEPF00014B97:EE_|PA4PR07MB8741:EE_ X-MS-Office365-Filtering-Correlation-Id: 349da9ca-510b-4bf7-63a3-08dca286a57c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|82310400026|1800799024|376014; X-Microsoft-Antispam-Message-Info: 1qqX7vpr9GDo9U9iQ3X7SrdycgxCLtNVU7x4ciV6KZVAHaEWfL7q09SrTiivGcsIRtrTeB6IxBYbf2ZZdyCGGwV/KV7Wvm5WM0Hke3COaT0ldbQcSO/FY8LTjG/XO2RejpfLYUw0b/TIJjjoYZcREgnaNvTxhOXKvfcKJThnSogG/Lf41Me14QnXfV0vIhNXekqMwRAs+vKr87DpGZ/QvPMoALUJG+wK4sDkGV61ysUKp/qlGS7YjeXGE9pANOzeCpJyhiXHBEdAFKdJeRCT6QPvNzzXdOt5xd8XHle49S/KYaATqtwlKerfSVxLalMxQJoZLZffG2fahgAbWaUd6Kdvm09BqEJUYl350ro0k3KR8TkBUGE4wiEJSlW/caO4ObCRryViyr7KTbcYGP8xx3gaTEXVmh8+jGQ08aopURaqTmYZZ2EC4eaybzt8yLBknpIUgind3ZxPPLkWRPT2S9NKs5E1YhCHKrPDmkHWqqXsf7Gi5ACztnA37dYfrRwA0hHsAZk45suu2RP2aO+JeLdLsOkI3AxZcEAf6DgsgyukK5xrsi+mUFj/oofmA5JaVQg2iy1gd9GnUhRLVngUoWuum9Ju6NNDtCLTRc5BvX7cT2Cb75b+BE6SmYqER4/XMcW1OnoREMjYCzjZ66xbclOpNp1TLQ/c7FufdK2YZ/SHFuSTBxYpg/TNPAAtnzPFTGheO+rzctItlKk49X1zRMNg6MtH0Ci9sJBbF1GLDkU2TVaUaJEUfKlUHPrtFhUd020xA+SWx4MIz3R5ufki6oH8HJCAxOL4qkTZemgRpyFDrbd2PZmgvHlZMAredcLmO7tuGKNLBPvDyuPwf4ogaCnf3q0vTiUEAh8R/sEAwYu9dlEsbRkEhMtFMJnEXcQSyJ+mMkB73rOTi3j6xFIf2+OlF+dYYM9d1RLrktyrEehf6jYgCqD3ggNd2ssKMqxWWL7pLu4oQzMdlTy/bb+E5t6/Yp/EOVuMCBTPa6jjogmx8SiULP9TOv/xcQXX6ETcSUYgEKGW9wBkSoPs0pr2yBi1VNZYaBaHVSiJ8P+UjKq7n3Xf09sJSpjVxuQmS/603PgsvbSOZW/D6SPDIKG1CeWi6tHgFlMpfc8Qd1HWFD17q0lJB+dVfFQEgF9CLzwChxlcQ4CbTXc4ji+Ai/ilSzsNpARcO/HIpkxN5rv5MBBKeFyLcYelQPJqcpEUSmZjvvyNXraf/wMrJVKLdcmEqtcLug1I3rzPHx2z4gS3B/mqoG1Ncf1q7mbkzwp6TVhlQZOk17rJkxtLR3xv9o/QotjOVC3E57XCmKLo/UToptXPXJzPVRn5iEvvs+r832DMz5RxqU6+tmtuLFfg6MiFoMYWWM1tIaqK03RTLse6Ta4YwN4HdxV6dehBPcSelyO5Ujvo3tbJ36Maec21mS0OcpMoXqH7B0M2Lc462O69yejY6Zb0yasDs99cgprA+6wl X-Forefront-Antispam-Report: CIP:217.111.95.7;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mta.arri.de;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700013)(82310400026)(1800799024)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: arri.de X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 15:23:56.4696 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 349da9ca-510b-4bf7-63a3-08dca286a57c X-MS-Exchange-CrossTenant-Id: e6a73a5a-614d-4c51-b3e3-53b660a9433a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e6a73a5a-614d-4c51-b3e3-53b660a9433a;Ip=[217.111.95.7];Helo=[mta.arri.de] X-MS-Exchange-CrossTenant-AuthSource: DB5PEPF00014B97.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR07MB8741 X-Original-Sender: ceggers@arri.de X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=kJVzws67; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2612::60a as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Add explicit pointer casts and sync behavior between libjson and libconfig adaptors. Signed-off-by: Christian Eggers --- corelib/parsing_library_libjson.c | 2 +- corelib/server_utils.c | 2 +- corelib/swupdate_settings.c | 4 ++-- mongoose/mongoose_interface.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/corelib/parsing_library_libjson.c b/corelib/parsing_library_libjson.c index d454aa79c540..fee7bbe3ad7b 100644 --- a/corelib/parsing_library_libjson.c +++ b/corelib/parsing_library_libjson.c @@ -129,7 +129,7 @@ static void get_value_json(json_object *e, void *dest, field_type_t expected_typ *(bool *)dest = json_object_get_boolean(e); break; case json_type_int: - *(unsigned int *)dest = json_object_get_int(e); + *(int *)dest = json_object_get_int(e); break; case json_type_double: *(double *)dest = json_object_get_double(e); diff --git a/corelib/server_utils.c b/corelib/server_utils.c index 33c2d9a07ae2..e38425638a34 100644 --- a/corelib/server_utils.c +++ b/corelib/server_utils.c @@ -22,7 +22,7 @@ int channel_settings(void *elem, void *data) channel_data_t *chan = (channel_data_t *)data; GET_FIELD_INT(LIBCFG_PARSER, elem, "retry", - &chan->retries); + (int *)&chan->retries); GET_FIELD_STRING_RESET(LIBCFG_PARSER, elem, "max-download-speed", tmp); if (strlen(tmp)) { diff --git a/corelib/swupdate_settings.c b/corelib/swupdate_settings.c index 28d89a1436c7..e23c9f296606 100644 --- a/corelib/swupdate_settings.c +++ b/corelib/swupdate_settings.c @@ -95,8 +95,8 @@ static int get_run_as(void *elem, void *data) { struct run_as *pid = (struct run_as *)data; - GET_FIELD_INT(LIBCFG_PARSER, elem, "userid", &pid->userid); - GET_FIELD_INT(LIBCFG_PARSER, elem, "groupid", &pid->groupid); + GET_FIELD_INT(LIBCFG_PARSER, elem, "userid", (int *)&pid->userid); + GET_FIELD_INT(LIBCFG_PARSER, elem, "groupid", (int *)&pid->groupid); return 0; } diff --git a/mongoose/mongoose_interface.c b/mongoose/mongoose_interface.c index 3fbe88e2ca54..8635bbaf4c82 100644 --- a/mongoose/mongoose_interface.c +++ b/mongoose/mongoose_interface.c @@ -770,7 +770,7 @@ static int mongoose_settings(void *elem, void __attribute__ ((__unused__)) *dat } GET_FIELD_BOOL(LIBCFG_PARSER, elem, "run-postupdate", &run_postupdate); - GET_FIELD_INT(LIBCFG_PARSER, elem, "timeout", &watchdog_conn); + GET_FIELD_INT(LIBCFG_PARSER, elem, "timeout", (int *)&watchdog_conn); return 0; } From patchwork Fri Jul 12 15:25:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Eggers X-Patchwork-Id: 1959936 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20230601 header.b=fxf8oplk; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::637; helo=mail-pl1-x637.google.com; envelope-from=swupdate+bncbdk7hq7yrekrb6mvyw2amgqehk24b4a@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-pl1-x637.google.com (mail-pl1-x637.google.com [IPv6:2607:f8b0:4864:20::637]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WLFmD2rKzz1xqx for ; Sat, 13 Jul 2024 01:25:48 +1000 (AEST) Received: by mail-pl1-x637.google.com with SMTP id d9443c01a7336-1fb90e56eaesf17719305ad.3 for ; Fri, 12 Jul 2024 08:25:48 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1720797946; cv=pass; d=google.com; s=arc-20160816; b=tNwkE4Yd2rtdqOYtJ5AVUXPDLnFHN5e69YjmyQhpUBPosuBOWy82SkCvyjUm1k90MD BjHzTx360xO6DTozLSaOdOSm36Rrxh3KDrIAWaDKstU6gn9duLvna2Utw0jB0qWIwYt4 wzD9NTmAv9m/99LRp46D32Bg4qygyD3a2q1IScC8gHdKa3Avw8ufpzsD+HWOqUjbl6Sm bloYnn6iKULlSFNApbFRJNtO/yYIJxx1fOB5WwcRGMnv/tbYqq9Bm0qumsl9o1+dsB5Q Tm+h3nmAi7g7vVucQnPeNbU/cxC/pbUhWoZ90GNWzidy+x3RL3WWQXS+ZXNdSpq6VJ8z dgpA== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=6LSR5Z/hko6ZxkHnm5ACJr9VMRCSeCtlnYnzosB1QYI=; fh=xFsuMbShJf5obZ/oIMKAMIC0y2ADv0DmPC32NE0vCVM=; b=f/Hq7TkG7rzNQ38W4qp9svgTTiCaxdwtVTNI14OI7pI5hqfga/0//+WGXAL3K0MVca M6HTHQZE0358djs3NnJAMlNfOEdc/Y7rB+LfuYJ18RCayElitQo5yDypSNyyR1gtOKeF En+ikLDNxlDEakqZZUQKZlP3aHT7j2I3z9I9wYWkfMvfKCnWKrlubkGZEsLjdge3bR7n 5tHSwWb2rQUpmpnOi0ANzRqPbwlbLLnw9xZPd45rTiNR+RA5B4qZXoepaK1vbup2kD/4 LlJu7ASYrqqehdOdMn1Ek2ol6EKNUYJ2nvJLDVRpI0gpcQ16L9De584Y5FhfvVu7SEdA fqAQ==; darn=patchwork.ozlabs.org ARC-Authentication-Results: i=3; gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=WRCifujM; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2608::601 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1720797946; x=1721402746; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=6LSR5Z/hko6ZxkHnm5ACJr9VMRCSeCtlnYnzosB1QYI=; b=fxf8oplkuP12K4dzCjli7G9FbbaR3wpq7Pl4DJzmokZ1oLd6LZIEdBd9UZTZ5q6Esa x/lnanwl+mSsKOFGrgS9OHGPn2Q9IVMji+IgFaGBojJkLEZ6JWIf2Kv0MJp5df8yKG5R zJndUT++2oBug6pBzHT04p3o0ISCOVPqKVyjA7KyBxnqi9b18RVkOGeymvG591CJU7+6 5JMonzlGvUTymRZ7NUAKP8cqQVH/D8RTSutGjENHCkcFsfT7tTfFc+vRXuAnXGwiSwh/ KmKVi/9sURq1Ei04BGXYjU9MIg7aYlFq8KeoKlBPNO1D1ArlkxODqJYmir1hKcrME2FX NGoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720797946; x=1721402746; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=6LSR5Z/hko6ZxkHnm5ACJr9VMRCSeCtlnYnzosB1QYI=; b=ostzExdZryiIEZey0QnnXbM7Bx+cbNZJRO2nhCB4Q0cwBzLfmgRHT8UVuz4JWGZjyp hJ5NlI/PvtQMs8rP4lbAKovLaRIUByquML0NdOBI3LMIqxeLcx++aUyxVI0awBPMbTVd aKfuMJXh4+ebmFMh9PJYMneZMXLl6CzmveKTaXG/JWkUtMc0ZaNxtyaj/2EJcT5NCH0k TwhQZYCo65k8baliW8l9BwFzC+c+h2awL79/ljmBcANz4mD1DK/QCCkOvpCrKAceNwSe WDkg3IDZf0rqKTZOifWU/fG9OjAIWzPFBTXDRi4gXCS0slom7yLGkRuBRyOd5gbr6n2p fwqw== Sender: swupdate@googlegroups.com X-Forwarded-Encrypted: i=3; AJvYcCX8X2iRKmSCmS6K4Fkdrr18Ohq7Q5MW214bkk3+/QTO734w31XCJzOYvNIAz3MAR0IQLk5vluMdggO5nr9KNWEb2No3z5NS/y1es/sVdA== X-Gm-Message-State: AOJu0YxYVLLF+m7DchhLE4XEgG+3hGVh0346gcvrn5Y+485lWacRVoDf z67B/Zx+e/qWLHZ86/Y1ZzcZSF5emAeqBYjkGlGgi1Yn+FNZPDMU X-Google-Smtp-Source: AGHT+IFQ6P1RDkUmQ2uodf8qWpK/FOgIBQvdqKbt6jStZm29tJVohbm0CGeQeh0EcH+1rPJksHZsBg== X-Received: by 2002:a17:903:230b:b0:1fb:8aa9:e2a5 with SMTP id d9443c01a7336-1fbb6d3d393mr111614335ad.19.1720797945890; Fri, 12 Jul 2024 08:25:45 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a17:902:e809:b0:1fa:a941:2f23 with SMTP id d9443c01a7336-1fbdd3feb40ls11393025ad.1.-pod-prod-04-us; Fri, 12 Jul 2024 08:25:43 -0700 (PDT) X-Received: by 2002:a05:6a20:2446:b0:1be:c86e:7a4d with SMTP id adf61e73a8af0-1c2984e36e4mr14197420637.53.1720797943182; Fri, 12 Jul 2024 08:25:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1720797943; cv=pass; d=google.com; s=arc-20160816; b=PMEhDqXyCXQ3pNvKSikWqXpjc55NwtlKm/4PyeRJ9Eajy1J+D3f47j0n6t78mP+m7E g3jQd6v16dsgVDHfRouqJxn7O6bZHS1HdDvsRBe/XNJi3KiXxFiPTUGYO80zQXXMzkb9 1WrS7PRzQq8odZm1JpvI8on1eqzfSqzQS6Xy2YkqP3l6emeHpx+aSSIyVeQaswJlpIs/ SvaFZ8DE5Zewa/SFCcvgbvx/E+vtKQvbDuGvA8RlLwjFU/t1zMIPKCgJf34p3ZNWqIWt z3jdv4aCVsWalMiav7Ls/q1R2WLA4960kX8WfJzUxbsX6YkQLuTD+zJXMYjUH4lsUyMb HQrQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=V2JhAXgUHrNrTVRJyIJANc7cGlXweA+PaX6tTldQg8s=; fh=Zaas7zo9QAZR51NXyZEDKjGEOyAL/jH6m/nrwgSdorI=; b=oydYoaYmkRcpX2zt+x7wyH4vdmG6JaGudhyZn35LFLKgDAMcHfWCMpgoJvjD13QYPg 1bFt+Z4m8cxZuTSRBIclb0C19CJoSehIWFYq62h0cb2TO361DvaPLSQlm2QJ6l5kIA73 dlv4pa4qdX6pIeq/1JK8Whc9c62ryZsBaQLE7+IqLcZxL5FrpE6Z/61rlNu0q6ZO2cky gaF9OJOW/9dOK8jIzaOHKROeOKvAJKZN5aIAxiPN3m0xpuOeMzKv75/yWS0d4R4PBSpy dmxLyKFBmGSDZJv/oyS8eQCmOwWHIik8XuxKvn+ab6odvih6qqSp2y2t8P1tgHMToB72 ohaA==; dara=google.com ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=WRCifujM; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2608::601 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on20601.outbound.protection.outlook.com. [2a01:111:f403:2608::601]) by gmr-mx.google.com with ESMTPS id 98e67ed59e1d1-2cacd6d69b9si77947a91.2.2024.07.12.08.25.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jul 2024 08:25:42 -0700 (PDT) Received-SPF: pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2608::601 as permitted sender) client-ip=2a01:111:f403:2608::601; ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=fGlutOyOa9FtM1zKWTwgR5+Z1x/y27uIZ05wukOBExtjHlkq4ct6SNg8jxS/I+IL6AFQp7I56aMCEYNaVpv4XXXLkQg6zCfN+CY9xcYTS4avORIk1m8/vmGTp0886awvTVJEhYjOoHKFWH3ZkvMuLYMnzw4H0+IYzCeW2JCR1QEP/w3PLSQBQeWCEVYMz5avlE5ARRvIRFaXVqIHOtJMr7hb2Crlu76BfO6DHNtMEinZ0cB92CyjJIcgOIkA/sG53K7+2+g2FKoJEkac8ncOtkHbE5zspGFuLRgOmFM5Q3W+IPDjJ8xhP4gbesoSm9EhnKJS1/J09HC6UKBhhJbVHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=V2JhAXgUHrNrTVRJyIJANc7cGlXweA+PaX6tTldQg8s=; b=uercBoukNqvAvfnu5J7Xgqg6u5fGTHWkKGk7WpSmdwVUQJYaJkJJzy/rM+gqk67zQub8ndI2o3b87h9zw0qgG5yW1GWBJDKIq+bYNOErCI7lEP/X1KuMemtOIFqnOMIapLnvqQTuXelX7ebbxaAq6NIz6sv6MVvCBOnCba7BmlQuBAPcbe1XWmaEjySGzTyk7mp6IfGWfn50KZ68O2mdkdnuftiTW+3/zuXsSDv14MvmERvVuKJVB43dAdUZcCKJAhWm7DwuR1aI+OFx6OZHq7PoEtAcCpmkiZsXfeaObnr1iK/xnNDUtajlsHq5s5+0GlDnSLiu4DhB8fXWw5yHNA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 217.111.95.7) smtp.rcpttodomain=googlegroups.com smtp.mailfrom=arri.de; dmarc=fail (p=none sp=none pct=100) action=none header.from=arri.de; dkim=none (message not signed); arc=none (0) Received: from DUZPR01CA0313.eurprd01.prod.exchangelabs.com (2603:10a6:10:4ba::11) by DU0PR07MB8713.eurprd07.prod.outlook.com (2603:10a6:10:31b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.8; Fri, 12 Jul 2024 15:25:39 +0000 Received: from DB5PEPF00014B92.eurprd02.prod.outlook.com (2603:10a6:10:4ba:cafe::43) by DUZPR01CA0313.outlook.office365.com (2603:10a6:10:4ba::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.23 via Frontend Transport; Fri, 12 Jul 2024 15:25:39 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 217.111.95.7) smtp.mailfrom=arri.de; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=arri.de; Received-SPF: Fail (protection.outlook.com: domain of arri.de does not designate 217.111.95.7 as permitted sender) receiver=protection.outlook.com; client-ip=217.111.95.7; helo=mta.arri.de; Received: from mta.arri.de (217.111.95.7) by DB5PEPF00014B92.mail.protection.outlook.com (10.167.8.230) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.17 via Frontend Transport; Fri, 12 Jul 2024 15:25:39 +0000 Received: from N9W6SW14.arri.de (192.168.54.130) by mta.arri.de (10.10.18.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.34; Fri, 12 Jul 2024 17:25:38 +0200 From: Christian Eggers To: CC: Christian Eggers Subject: [swupdate] [PATCH v2 05/10] Fix usage of GET_FIELD_INT64() Date: Fri, 12 Jul 2024 17:25:31 +0200 Message-ID: <20240712152531.4329-1-ceggers@arri.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240712152253.3702-1-ceggers@arri.de> References: <20240712152253.3702-1-ceggers@arri.de> MIME-Version: 1.0 X-Originating-IP: [192.168.54.130] X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB5PEPF00014B92:EE_|DU0PR07MB8713:EE_ X-MS-Office365-Filtering-Correlation-Id: ff6cb84f-9de1-418a-490d-08dca286e2b3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|36860700013|376014|1800799024; X-Microsoft-Antispam-Message-Info: kv+Fm3NEPhQuTIOb7QJ7yYjvUN42AvthG3jR0a3zP4ewuZi64b6IYb6BDzbjw92Up2LwlCYtjeuCrUfJOVOL4Ow3+ZLFr5ZQv23JeIqendbGzUI8gd5m75jyuy3dd/Hkj25OO/ooODXOh5NM5P+pqkMvmmMevktm0Vw1IQtTmS3PGmjVZRsPJFwV+UeDsztjQJSBbQ6wh13aFjtANar3Ml+cRPxNwY7RR9TQM2/6Z++MFl4TRlT905DuM4dEyQ2/TytFDfXJoy0UCW7LAWSGejMI1WeEGq17ghzxevHuPrKyaV38yRoJx3YXR0Ca1dS8U61VO8Rj+lckYW+fCVOE7NMQ9N5GfYYggjSAHSi+bhxfdaH9DiIgB0jlsEnNfEpewemcHYWr3bDsQttFSsabzJsJYtCzWWZQw/4cBoNCNWCPskqIXOSjooLh6EgUICyJ/rRP4T0b+lPGvLmzdwgbJVC0tTGzgcz6t0rzM5fIwaP2sJgOlWQ3F1estcw//M5+XPog0QBHyw0DJOjjP/HMDsaeoBfdHPS9CWKfL/fYPvnY+T3TiegNggzXxlqLq9Spp7bQQPu4EjWCPD8q0GBARUs362NV35Dbcsg29bM9Bafc86ep9tIGxZvQ05oteBQW6NEjqCtg4lgQaduUW05sg4DN1FpOsbOB9d/920NmrcixvQVO6M8zqSP6NtfTICcPIHEvyxMZUvArosH7iNhDsbD3I7DaQaHKXBzQx99PdanPeNLQwh4Sf+0Su0Q5kTkbceI5gA5h2r3yemdrnoxLW2w9Y7mY9id5enfCcHMlrqECWJca5FTqpImHLxDnOVFP8v/cYCwXjzIk1MCRbIf2Qrh1brPwQDO9eCrXxMUGTM8UvEng0wGWvk8agc2BFFgwb0vg1oGKafStzPWrcYrOuuW+G9cYQAgXtIuNJ11XCxJD0tZu+GqknB8heeSeFRcZJYZAZLHzc2FQSckzS5qBPltLdSFp0O/mFyBp/ur7Yqc5btKxpBNBvcqkaAfQIoYLVEFc1ugxeolStPRts5nI+QOIWolC41Eo1QBakdS+xDclUCBC52CDoerwlYtVdZZX1JAsBissxzso+Mi3QJ1+HHDwgvWIYUL+4jcZKYFJMWNioItNhJwSD/v8XCCor7nz/u8CkEjejErWcrptJ+yUwZjMmgJaaWA/eM8Z/+n8Xeh+pmlFqt1/5NcVUJORodjOrS1ZRnBEK+7TN6U+lPqZ2SX3YiD5lHS11EQry4kuya2UiMxPoeDtGdwlRQbYEDlAGporh0IayHoSkI7l8t9ibCaiUmBjYMo/Bwnmb85TuAtBkGRBp4aSmnootV4zdRWgFd/WwZr8WfZHfvC8jmhF9EkQv6NWk66GFqR4kZ5A8ceywB3k29dAX5PM7NGkD6fofHF1XBEXGJ+aTGMf8s0wSNv7AWKA24XQnLE5gHQ1D8z5Q5QEqSlZncRDpbCDetDk X-Forefront-Antispam-Report: CIP:217.111.95.7;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mta.arri.de;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(36860700013)(376014)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: arri.de X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 15:25:39.1860 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ff6cb84f-9de1-418a-490d-08dca286e2b3 X-MS-Exchange-CrossTenant-Id: e6a73a5a-614d-4c51-b3e3-53b660a9433a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e6a73a5a-614d-4c51-b3e3-53b660a9433a;Ip=[217.111.95.7];Helo=[mta.arri.de] X-MS-Exchange-CrossTenant-AuthSource: DB5PEPF00014B92.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR07MB8713 X-Original-Sender: ceggers@arri.de X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=WRCifujM; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2608::601 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Add explicit pointer casts Signed-off-by: Christian Eggers --- parser/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser/parser.c b/parser/parser.c index b092ebf6faad..c8571628c99a 100644 --- a/parser/parser.c +++ b/parser/parser.c @@ -427,7 +427,7 @@ static int parse_common_attributes(parsertype p, void *elem, struct img_type *im * multiplier suffixes are allowed */ if (is_field_numeric(p, elem, "offset")) { - GET_FIELD_INT64(p, elem, "offset", &offset); + GET_FIELD_INT64(p, elem, "offset", (long long *)&offset); image->seek = offset; } else { GET_FIELD_STRING(p, elem, "offset", seek_str); From patchwork Fri Jul 12 15:25:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Eggers X-Patchwork-Id: 1959938 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20230601 header.b=hhFlcntr; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::1038; helo=mail-pj1-x1038.google.com; envelope-from=swupdate+bncbdk7hq7yrekrbfewyw2amgqexnrqebi@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-pj1-x1038.google.com (mail-pj1-x1038.google.com [IPv6:2607:f8b0:4864:20::1038]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WLFml29lxz1xqx for ; Sat, 13 Jul 2024 01:26:15 +1000 (AEST) Received: by mail-pj1-x1038.google.com with SMTP id 98e67ed59e1d1-2caaaf5870asf1867536a91.0 for ; Fri, 12 Jul 2024 08:26:15 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1720797973; cv=pass; d=google.com; s=arc-20160816; b=JDSwsjGiBpVxmKlMoiush2wyI7UC7ZouaiEkNgRF6IFuxz/FdU9LCkcQ/cWzS2L0B5 48uqwa0cgiz74B2VurzJdhlL16iuvC3Ou+o9sCS0WBoIr5qffcTkAn6oROiTAmlfF5dl b7+Hkm7ObcCby2S/YUFXJ+pC2PARMbnemAkuA6aSJMDgU3qox2cbc7WtAwOnD45R4XM0 09aGdN03cMigICpYxzR7gpV3LmqEW5zvFy/dxFqQseS2w7t6rDKOWgKPhCimjToAIWd0 3CTevESPciyScjakIwxcKJRlXog8c6nzBU4UCXOHXLmMvM2uxkQvRaPX0k5UeNOq8ZIR 5R4g== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=vcAbxy4cuuacAYNQYVu9Zqjfg/CA+Qlr1oPmxySuzz0=; fh=OVVKrISzIgVdJm4IleRSA/gfxXJWbGatv4gS+KSHo+Y=; b=NilQcwI6YBoSGI5y66sH5QskS3OEtWNantpJCtOIq97q2y2DRM8Y5Mc4Dg5ujTosQ5 2lovLosfAiBkFewybydod7wPdT7/Z/xAKFdKN/rrKsrlfs+0uW2ly8btuJYSvWmfpgWA BvE57xGZRHa4mQE8iynYy8kyr963bBMIbblAEqfIB/8s9gsa5xDatxk3GWSPGE1hCwmc p0KWFWfzkRnojKCXB0rEme+3B5j+PmK9Uqa/6rHliw8edr8H4JHaH0x2DL/L+Yzzkzpg XrNrpfh0jeYqZ/mc5/JVDZah+u7ZZAD1O7nYWfZpfDasIhWyTG5A6KEFH08GizsYZzsD 7How==; darn=patchwork.ozlabs.org ARC-Authentication-Results: i=3; gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=hOdsDfDw; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2613::600 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1720797973; x=1721402773; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=vcAbxy4cuuacAYNQYVu9Zqjfg/CA+Qlr1oPmxySuzz0=; b=hhFlcntrHiCr6jhOqiR3sQllpvrP9gr4KyNiZ58h4YMTPFEcFdbMr8rlJ5rHgkMzkq 8VkE9bWRGg/qmWIKLI62Ca32l/Uk/qbcFvFtrmaW9LfFLzMubCVEGL2gulE5E+7f4kYq ZGw9Sl+qgl83sKm4eYsqOU+WkH8NtvHU5iH+eO/OMFRWoPLL7o9GHfldSrsj7zHuAPkt nUwFrAVaNuRt/sF+xVg1riJ+I3xE3ofiz5LeeuT/H+cgsll1tTlOrIXVaRJ53vxEg+9r h1lsQ0najS5DEhpvdI5XI7tE5SuLXmQJvE2QFBMu3Uhki7LFMEvxOnpINmm4W/KcwVe6 +w3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720797973; x=1721402773; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=vcAbxy4cuuacAYNQYVu9Zqjfg/CA+Qlr1oPmxySuzz0=; b=dyMi3GfIW3xE/XejqHihR7Fm9c7tyjYnN4xMeQ+WYrND0Ba7v9bP2J/byk/sf9WwEq ni5KKjF2Du7PElmlLwCxPuiF5YiVGOYC9jikVM4l0UYJtAyaZ7jlhjjtdStp9cLEjISK FF23fQ6uokZXWx8IKWKwjY1PBLj9hIJTkkLKXqO79TlpESgKBBjV3zvLtCDEKr2iw+M+ J5/xmke1Uk9OQgT+p5PUKdlPXHXQlidK2F4dAb72hJ3Q8UB5DPkNA3FmwC/S3L08VRjB wrDRQYqCh1d3bAolQ+O0P2+Och2M24tK0D3v1PelqKqAbj5CFXoUvqIoHvZaYhmuxWVU CEIQ== Sender: swupdate@googlegroups.com X-Forwarded-Encrypted: i=3; AJvYcCV8ce62DvsdPCscZ4TJaVIzHpCr10v1QLKVaFmXFd8RFetJbRUAf0TbbgwHsIDAHs5kWTPS70uObrVudI6CQbbcP4YD0wLn31WycE6rcQ== X-Gm-Message-State: AOJu0YxHjavsiBT32j8Q+xN9Q7AMyL7x9nOOaeX5HRhSJNag6GTqNsoc Q4ATImaAQsd2FDB88VTBSeUvAl3VZqGszKI8kjzXUyN0qp00cU5V X-Google-Smtp-Source: AGHT+IHlN4tjgYokDCkjzQAxtmvVovzPLcwCK1B164K5azfO3xHget0TQRyUMpoYP4zaP7oJntnfQg== X-Received: by 2002:a17:90a:a414:b0:2c9:75a4:cc71 with SMTP id 98e67ed59e1d1-2ca35d3ad17mr9584559a91.32.1720797972942; Fri, 12 Jul 2024 08:26:12 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a17:90a:e154:b0:2c8:14c7:beca with SMTP id 98e67ed59e1d1-2ca9fa73c27ls365313a91.0.-pod-prod-03-us; Fri, 12 Jul 2024 08:26:09 -0700 (PDT) X-Received: by 2002:a05:6a21:999d:b0:1c2:a0b2:e69 with SMTP id adf61e73a8af0-1c2a0b2110bmr11995462637.33.1720797969571; Fri, 12 Jul 2024 08:26:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1720797969; cv=pass; d=google.com; s=arc-20160816; b=ZmrDkwyeULZdxN2Zun+Sl8qbUzGu1UFOhepBDoJo/QZ3J4hGNKVkhpstjxRrj2b4mc eZzwKmWaqYJOZl0kkaiwoEShVFoqpgaXM3PgCWYjydoviLD99qS3NottQtK8zoBTSuJT 5gBlhiBVs1PZSGdJ36nBuWadMVrIUw5xHVEm54gTfEnJ7lmcRKlpu9YIKS8KX1wiAFJW OR5m7bcLD7url6HeUcASMFJWf3xXvN/1jUlnQDGOMxrLKwRwFiP9EUOZjC/BrDNjvpkp z0xfcTiWz2+wyXt/ZzgAMGFxbRBMbor5k23aC0r/KmI+Y1NqM9Q+ZSpX/NYWShSEwwQR Up2Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=YD2jUrElGZjuKN01FAeJF//nYfMVMs4/vu//zel846A=; fh=Zaas7zo9QAZR51NXyZEDKjGEOyAL/jH6m/nrwgSdorI=; b=qSwg2FhmDITEmkQXbhJpl3KYmWUv7sVSoP9hiNvMCpTL/23MuKngBBjzfugHB9Zi3J qRiH71H99NCJLCbzYrup0SzGZ6GRz7wYzTFMxPL756k4YaqDLx6xZ9vwuXTcZjP+cBZO 4crPad3zJ5odED4jFSeX2ezEi1QJT/EyqYWeCsN8y0m+4sz8PvF3Lx+BbLqMJdZltmFL 0TqhSUJDSoFAWeOF/6GVvyrqhkRJsTPumKe53JP6SrwgRceNeWXwtEYSPsZzOSxKNU34 P22bIXizjP4k4GRKM1si2m7pzJAtArAnKIlVyD9FnYtb5MClh88C7Q3JKJwgKPcSKozf yi4A==; dara=google.com ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=hOdsDfDw; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2613::600 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on20600.outbound.protection.outlook.com. [2a01:111:f403:2613::600]) by gmr-mx.google.com with ESMTPS id d9443c01a7336-1fbb6ac00ccsi3383845ad.8.2024.07.12.08.26.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jul 2024 08:26:09 -0700 (PDT) Received-SPF: pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2613::600 as permitted sender) client-ip=2a01:111:f403:2613::600; ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=eO2gQ9b8287QOcsorAbW8ur7HZYi9y3+iQm9PlTtu246DDfj42Ym8mSaSeQd0AADvxbh5SVRwPS/fr/NmKipyoqZnKRmzH0bIoxYEiUGj62AE2kzh/5BcDY8GfxM3uFlFr5ehGndqqrTq6QXuY9A+rxV1ci2zbOVFMdFEvkxJ9T6X+w8Eqau0sNxOjHwLvdSaMUE/f2NkfZDMSCKdL1Ugc0HSNX0xf6K3VhputtD5+QV07kpi1lFK3SBSdt/wynM51zY37puSrS8HFmEYzsgIAbsA68msvPz2hghO7JB3hej1S+6HkDPQt+nk7hhiK8CRMubrLFHUAUNeah803H2gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YD2jUrElGZjuKN01FAeJF//nYfMVMs4/vu//zel846A=; b=kSwe64BUOC9zHtOiBuBrPmQfUqsdybdLv/Zy5/DFkWZFl/1kZaO2I50gUHFNpj5NifRYgAb4O5igmTVcxe6vHwTBXxDnofSvFm7UsXb51iWCHisG3t6jOXJRgO0wtQjayr0VU4SHqMd+8QcWvxIdxMHLIB7cIjy9fjdbpdeAoLpBBvN7gY+R9sOZcAq90N1TSaunuCy/F0l0wyWE8OAUO5c/8QKfQKoJ8eR5zj7x15gYmjPkTtdlz29ReUT026kjJe4T/bYVpCPWgh5hj7quZ+ojshbJ5d4Bg65JnuB4gPZH1+KP4fjGX9p2ssImrMBGUc2/qmXXb43DQzhZGnSqPA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 217.111.95.7) smtp.rcpttodomain=googlegroups.com smtp.mailfrom=arri.de; dmarc=fail (p=none sp=none pct=100) action=none header.from=arri.de; dkim=none (message not signed); arc=none (0) Received: from DU2PR04CA0275.eurprd04.prod.outlook.com (2603:10a6:10:28c::10) by PA4PR07MB7071.eurprd07.prod.outlook.com (2603:10a6:102:d6::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.8; Fri, 12 Jul 2024 15:26:05 +0000 Received: from DB5PEPF00014B91.eurprd02.prod.outlook.com (2603:10a6:10:28c:cafe::a0) by DU2PR04CA0275.outlook.office365.com (2603:10a6:10:28c::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.23 via Frontend Transport; Fri, 12 Jul 2024 15:26:05 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 217.111.95.7) smtp.mailfrom=arri.de; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=arri.de; Received-SPF: Fail (protection.outlook.com: domain of arri.de does not designate 217.111.95.7 as permitted sender) receiver=protection.outlook.com; client-ip=217.111.95.7; helo=mta.arri.de; Received: from mta.arri.de (217.111.95.7) by DB5PEPF00014B91.mail.protection.outlook.com (10.167.8.229) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.17 via Frontend Transport; Fri, 12 Jul 2024 15:26:03 +0000 Received: from N9W6SW14.arri.de (192.168.54.130) by mta.arri.de (10.10.18.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.34; Fri, 12 Jul 2024 17:26:03 +0200 From: Christian Eggers To: CC: Christian Eggers Subject: [swupdate] [PATCH v2 06/10] parser: GET_FIELD_*: add type safety Date: Fri, 12 Jul 2024 17:25:53 +0200 Message-ID: <20240712152553.4407-1-ceggers@arri.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240712152253.3702-1-ceggers@arri.de> References: <20240712152253.3702-1-ceggers@arri.de> MIME-Version: 1.0 X-Originating-IP: [192.168.54.130] X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB5PEPF00014B91:EE_|PA4PR07MB7071:EE_ X-MS-Office365-Filtering-Correlation-Id: 4c9cb1fa-dba9-4c67-3683-08dca286f156 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|36860700013|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: ZMf59TNy1BnO9fQJMcIcWr6CMXkpi/R0rZt3un/Oo9PLQBoc0TzHFnrjijzkJEUjlc2hJ+CxNQzIUpP9PFE8mLcUK/ugF6CqExuuTGioXqHT7/io5ckjgHUE9Ad6IULrAl9lzEBKGT6tOWSr40v8Undsr72hiDDJeCkDo4xxV4AGshPb8zQEddQolyfeZhutt+F3w6YnBD4395VG+JHnyYWLpkihxSnWDlNYW7wbxPS7R3gLzkXRIfYcIPt9dI+k+/vayAgWD4i6sRfjLmMHttScpYdFPPpleWFa0Z/1GNrL/croPit20zz3As+TRa8LFwmeGMwuh9PIB1zVuftvSKjWr2tYTtfcHIHHDT+foZxQTg7RwzMyR1t5+RnVHr0UDzBYSgcXB3u6pZG6oQRF81A4jmjmx/86cXiGZjge9ciCXUiiKqreKVeoTqCxw9E0UHKNaeb9ux3fuJjblFNvyX+QHWxyHFtzwi5DN+mOS6MXK2w5lKSTQ4jrnzp8DK0j0z1km3fuyCRNL7I+NeYL2P2792O4zQdxVywPF/k2/VsCB+Ko25D5kIOUIBl1yXQ7SSDtVH2e9S3LWfLieSRYQ9Oc7+xRvC9vn+Czq6dzbO1PKz2Ir0W6T0rxiigVyUUQodQIrh16fGroYOgPxhvUCUj0yBc6ppEO8Ak/iBsdoIcxL3eULK165Yu6kNJqUogOsuZz704zxQJY9YckYHEQ1wPkaH0h8ovvQksWWvrljngtZaCKZmQC7DnSGdHVw4kQUUQ0iURBZAnabfYGA57N0K7vjxXs5YJMnsBa40g5iVepUUJhHXXAC32hEymCKQDqWGV6lh5yGB18vd0LfEuvSmPsuGShYAZpTyJwbOQadJ2k603VJvfoKnVDp1rNM4FV61ocaYX5K7HAqYBZxiu2lZ0r9QKLBCus9BBtzuqRH7frT37F+ELLuB75dgqXUz+tZp87REa32Ko2gzAymaP1Q6vmuC2Erb5BRcZ0OWaobCJOyXW9LajfJCrULpENfY8XqC4wyr9jvTH+Lms9I2KEJ3GlWLKOsPtJvdw9Vi3L/uK3uAD5uRd32k3sWiZgu83aUxT07povl94CLh7wvZOoLv6yZC+zJaTdCD/r0WMr14c3pAdo/u2cIz7FmhfeHh7RoDyzO0dgNyVwjc3LutlOoiz5J2C6DlvdXbnun76YEiY/7uAsLrgBvQZs9Rgb22B/VUP/xNa4OW0QXlDO6Swxys7rSMN/MY9nrVd2YyV0X61o2KJIA0Wi6PoIcpHJuzNqOdGYv1zb7+xxMaq50nKn4uTAebCWV3Ue+K7Jn2N1xwDLtspXoMwnLpPO9pg7/Jflknxak5ujDFvCOfC+5VbwC4zEJFerWV6il3tuaB+BnSX4bqPcFnQAod4hH/XRz0ewVKByO/fOg/YL4Wu7CramFMe+/AQ/yZtK93tfQM4d9lp9HjPbgzJZAbbUj+xWsPAe X-Forefront-Antispam-Report: CIP:217.111.95.7;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mta.arri.de;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(36860700013)(1800799024)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: arri.de X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 15:26:03.7263 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4c9cb1fa-dba9-4c67-3683-08dca286f156 X-MS-Exchange-CrossTenant-Id: e6a73a5a-614d-4c51-b3e3-53b660a9433a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e6a73a5a-614d-4c51-b3e3-53b660a9433a;Ip=[217.111.95.7];Helo=[mta.arri.de] X-MS-Exchange-CrossTenant-AuthSource: DB5PEPF00014B91.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR07MB7071 X-Original-Sender: ceggers@arri.de X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=hOdsDfDw; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2613::600 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Add separate inline functions in order to ensure that compatible pointers are supplied. Signed-off-by: Christian Eggers Acked-by: Stefano Babic --- include/parselib.h | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/include/parselib.h b/include/parselib.h index 4a8717e0aad2..a49202a4b40f 100644 --- a/include/parselib.h +++ b/include/parselib.h @@ -65,6 +65,26 @@ void *find_root(parsertype p, void *root, const char **nodes); void *get_node(parsertype p, void *root, const char **nodes); bool set_find_path(const char **nodes, const char *newpath, char **tmp); +static inline void get_field_bool(parsertype p, void *e, const char *path, bool *dest) +{ + get_field(p, e, path, dest, TYPE_BOOL); +} + +static inline void get_field_int(parsertype p, void *e, const char *path, int *dest) +{ + get_field(p, e, path, dest, TYPE_INT); +} + +static inline void get_field_int64(parsertype p, void *e, const char *path, long long *dest) +{ + get_field(p, e, path, dest, TYPE_INT64); +} + +static inline void get_field_float(parsertype p, void *e, const char *path, double *dest) +{ + get_field(p, e, path, dest, TYPE_DOUBLE); +} + #define GET_FIELD_STRING(p, e, name, d) \ get_field_string_with_size(p, e, name, d, sizeof(d)) @@ -74,13 +94,13 @@ bool set_find_path(const char **nodes, const char *newpath, char **tmp); } while (0) #define GET_FIELD_BOOL(p, e, path, dest) \ - get_field(p, e, path, dest, TYPE_BOOL) + get_field_bool(p, e, path, dest) #define GET_FIELD_INT(p, e, path, dest) \ - get_field(p, e, path, dest, TYPE_INT) + get_field_int(p, e, path, dest) #define GET_FIELD_INT64(p, e, path, dest) \ - get_field(p, e, path, dest, TYPE_INT64) + get_field_int64(p, e, path, dest) #define GET_FIELD_FLOAT(p, e, path, dest) \ - get_field(p, e, path, dest, TYPE_FLOAT) + get_field_float(p, e, path, dest) From patchwork Fri Jul 12 15:26:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Eggers X-Patchwork-Id: 1959939 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20230601 header.b=D6juIjkq; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::b3d; helo=mail-yb1-xb3d.google.com; envelope-from=swupdate+bncbdk7hq7yrekrbhuwyw2amgqee3llpiq@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-yb1-xb3d.google.com (mail-yb1-xb3d.google.com [IPv6:2607:f8b0:4864:20::b3d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WLFmx3gtqz1xqx for ; Sat, 13 Jul 2024 01:26:25 +1000 (AEST) Received: by mail-yb1-xb3d.google.com with SMTP id 3f1490d57ef6-e02fff66a83sf3892938276.0 for ; Fri, 12 Jul 2024 08:26:25 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1720797983; cv=pass; d=google.com; s=arc-20160816; b=T6S1109L+GgJB7TVEmYKPLuQrui31WEl/197nveNhrvuzbs+n1EBVP6Vo9gkekxLgR GPZD1aeBbVAa2m2uvxQFn0T1JpWYk9A5bJdH44acZbiO990/2xZlVJFZzGLLaVL70InS M8oATmSpYHItgCEXHHmMTNt1sPs3Tw9OGYL0Ma1gvCuz+h/xLH1vgYFvF7RokstnZseQ QcjwB5OFRI4H4TDqrjQskaWieQUtd5CbGegw5+9YAJb5D+HTxavHdHHDORGyv+/VzJin mBYnmrFciR+1EQMY2HmHWGC8SrXDwOBUQWNwZUoB9kuttv6MMPvoPeO/JcCq2bK5005/ jrUQ== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=55xGpnnWGULRPVgIPridmxHlnxhub29zUAxJ2jbC9DM=; fh=fcW6ytz21GPkNhAaggiW/ojlBKLIUioX9TMmPo4g9NQ=; b=GwmS6jwNVYxYy4X4Y7T/5lssvPtjPHmdFY5QyfUWWclmA8KPkiI/kh1kTmPj2Fme0m JxgL7kthtiYXjinsPJcpTxvOd68E2ASgrFs/xMnXrg9396vNDWAMdNaHLthSKfqXQxlh 81mB5v3h0+grpsrinSeK2CJstDv5I6XgwCBdtU8QQnWmlsXUPkfBlcpWeF4aqmu7shRQ 1t67yvm/03DuCCUezGvJxMt9miOc0S8WLCeMyq5Ec0tGngUQu4ANJh4eNK++KyWjz6Ck zDxyH/hg9ijpcF0AqUfDb3yO6pefxbEcJN8MccwbCXoznqA1/exMuD8iGXrJl9Ba36Lb I2Ww==; darn=patchwork.ozlabs.org ARC-Authentication-Results: i=3; gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=szfa0Qt1; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2607::600 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1720797983; x=1721402783; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=55xGpnnWGULRPVgIPridmxHlnxhub29zUAxJ2jbC9DM=; b=D6juIjkqCZKZJVaG2185GM2++tXnVHIO3fjzmt4Hwbe1ptxwYmma42aUCArW5IIMSA rt1nRcPSxGJPfq8OgOVbweFxbA0Zt8T0liiTMyZvPRkLkyvakgQrZG63O3KAxdnOs2l7 519Z5mLjVuoK39+7HtsQYFpSp9B4+kajshTQcnqPNnETE1eHdTda/J0iOVILB+wCJEKn +YKCnXtj/dZH1dBENcbVeY+pRsu0+PkXVwPocF9BMwS0LdTPfw8uIQzm1rKgdDdzCNVr sF2YIu+1IUedki+YzV6pdrSgtV2/ZkllFA9aQqY+MePQxB8RpPeDZXXJagQU86iLjs8Q ZD4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720797983; x=1721402783; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=55xGpnnWGULRPVgIPridmxHlnxhub29zUAxJ2jbC9DM=; b=djicG2QFRlrKh1Ad6C/5bDnTNAvgF+dg9SCcNxVRGMBxXVdxthLYIhwNHWDxiVogoQ 41JVXfVyA+n16Hx0fx8SU7NXU9ws1duqe134OdZtKnA54jPFsbiFQ7exkT3y25fh8sWQ HmvJdehFCvb9NsZrcM6wnGMN/Kvndd+niJnPtDzlGxJV7zmbPrD2tdbY5/fwvh59NEjF N+ovZ1FmrhHzKOlOi5gLUtYAdv2zeHEjnCaYh2OeDWA8pUJyjt2Gr5zcK+xZuLIP9Igd P7O6XlJVR/bZU2Z/X6cJosflDXuki4pXOChu1LkdLe0XOx44ey4Cysup10rLr2yFTS3l oAjg== Sender: swupdate@googlegroups.com X-Forwarded-Encrypted: i=3; AJvYcCWfF3rlCwe8jTekewPEcWyrzldaiFdipef/+p7KZuGbzbK4fwdUuNXOI/brFZe5eWdc2Ve6QZCCrpwh+Q3Mljh6mPkudQxHyP4xasroIw== X-Gm-Message-State: AOJu0YxNdFmb2ngBCCdWR8vg41A0M1CNhEuxw7woWWbsWDcukTS/59eB W9E4m+MANwZMv5mwbNAnGbMZr6IyhjCexkKHm/zeurq96/wYgLOE X-Google-Smtp-Source: AGHT+IFHA2QdCYSw4pGFU4uuIk28AjbaoSSWPAtG1v9tYJRqavXyUh76GYMffpgm/C1UUbVj/U1y1Q== X-Received: by 2002:a05:6902:cc5:b0:e03:5ff1:46e2 with SMTP id 3f1490d57ef6-e041b065c81mr17946571276.26.1720797982769; Fri, 12 Jul 2024 08:26:22 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:6214:18e6:b0:6b5:268:d754 with SMTP id 6a1803df08f44-6b74b4409bels33864946d6.2.-pod-prod-03-us; Fri, 12 Jul 2024 08:26:21 -0700 (PDT) X-Received: by 2002:a05:6214:1c8c:b0:6b5:90a8:913a with SMTP id 6a1803df08f44-6b61bc7f758mr165977936d6.8.1720797981205; Fri, 12 Jul 2024 08:26:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1720797981; cv=pass; d=google.com; s=arc-20160816; b=oOc0kgpiq51Dj7Bma3GvX8aAjPikSE3XJCTmuSEfNl2LB4ngxqU6QVS7OGijrIvWQK +dFbjf8dtyIzwB4VzeNO7Yvaz486roub75brojt2H3oua2GYxMkqMzRXdsGraCx85YBF oeMfC5GT55ar7ph+n7r2ZjSsALKhJ61aGvxIWVwLJOkLxy+Pyokt+35nYBXo4fUVZs/4 ptQRY8NohXNunoyAounovqwfLzBBAU+QA+T7o66nWrJGeCs2LYgjOVBa+woRA4kAK9rU duV/bJU9/ha9gPSSuTWJlWS8GZ4r0EwPn5P9bWFLqKUhkxFzyjCIsFs69If1dHpPh38o HsTw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=nPRHp2FUcAxRHYZ4DT2Yc0teNm7hW+DYD8o6Hmc0mNQ=; fh=Zaas7zo9QAZR51NXyZEDKjGEOyAL/jH6m/nrwgSdorI=; b=TiNt/50spNyQsUfDahal4CcIQHRIDLm6hxaMeWCH9/FkS5h4deHp3Q/Nds6V5jyOwl pVuVoEMWoU0efsqmQ+XvmH7KAFHF1thnOwFHK/1TuuZbZgAGcAmI899ReMIWBdqLBukO +hFDhJqHyBVhDmkXpk8eBDCvI6sG5uNVKeXIuXphs7BXI61LwnLnJ3ZxadPTRlgXpyMW MoOqPL+9+TpPztJcDVzN4e877JSNOC7S/0jeE9KVcOOTasBnz5zC8E3ibmBDvrD0zd3B H9Fx49CcpDqQKAbyXS2vCTomkV5EuBjcatve///+qNdeMcegEAAQx7+IuXjzECHyZK4O 8Zng==; dara=google.com ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=szfa0Qt1; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2607::600 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on20600.outbound.protection.outlook.com. [2a01:111:f403:2607::600]) by gmr-mx.google.com with ESMTPS id 6a1803df08f44-6b61ba8dffasi3627086d6.3.2024.07.12.08.26.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jul 2024 08:26:21 -0700 (PDT) Received-SPF: pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2607::600 as permitted sender) client-ip=2a01:111:f403:2607::600; ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YWVx/pQqSBAd4PH/cO2dlKbfDAEPZ4dFZFMkGgYULdoBL7E0i4GOZnkd3BflBx8SaUD2LUrr/drvjzdqbS+GPFP9RSKooEPNGs1COzDq0Ftkes+16AGusmfGr5jCiAmsAi9qMwAdzlSUFKoKbW+65AjYdcOO4W3wVtdhQyo/baC4GSSRBgoObJnDdzOdDJJGVOjlKLSFJVs/7r8Nc5/s1zBDGstcQVCrZF9KLyCRPZLqu3MmsazjC3IA3R9jZlQ7qAYmPRaVU6hSjs4pHgb5Sl/J8afdD4hP2LlzyS5jO9kHXYT2xIwDOJYNdg9Bai9mwS8/Yy7wAHStMbieA6QhZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=nPRHp2FUcAxRHYZ4DT2Yc0teNm7hW+DYD8o6Hmc0mNQ=; b=i9iJSCvK97udj0UXl+KH74zX9q/cVvmbM1VqDSTeN6/hPacusxofISIshCuQkz5gs7RxmSjHPHDXd4bLTl1ep4Xc+wKdxkz0+PdCYsr2qjUn2MuYeiHSwAj3j6BXbZ+7u5PmX0yioXZo91QszQUD8guIw1VVFr/et/fEoe0Llm+bItxX94zVUb59ctdRnUf8+D93MpSB7Wco8HaBeH5mpqvv3nddxpVpz7hpcSe/xCRH1vzXz7jh+49MB9nibBLAcK1AQVYgbGNNCFpPxBVMUUXDokeXWA0UukpDcZszhWTcLbswaIcsnHjBNpJWw01Ld1M9FECZRVmPLP25mxr4aQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 217.111.95.7) smtp.rcpttodomain=googlegroups.com smtp.mailfrom=arri.de; dmarc=fail (p=none sp=none pct=100) action=none header.from=arri.de; dkim=none (message not signed); arc=none (0) Received: from DB8P191CA0004.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:130::14) by PR3PR07MB8098.eurprd07.prod.outlook.com (2603:10a6:102:171::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.8; Fri, 12 Jul 2024 15:26:18 +0000 Received: from DB5PEPF00014B94.eurprd02.prod.outlook.com (2603:10a6:10:130:cafe::74) by DB8P191CA0004.outlook.office365.com (2603:10a6:10:130::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.23 via Frontend Transport; Fri, 12 Jul 2024 15:26:18 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 217.111.95.7) smtp.mailfrom=arri.de; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=arri.de; Received-SPF: Fail (protection.outlook.com: domain of arri.de does not designate 217.111.95.7 as permitted sender) receiver=protection.outlook.com; client-ip=217.111.95.7; helo=mta.arri.de; Received: from mta.arri.de (217.111.95.7) by DB5PEPF00014B94.mail.protection.outlook.com (10.167.8.232) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.17 via Frontend Transport; Fri, 12 Jul 2024 15:26:18 +0000 Received: from N9W6SW14.arri.de (192.168.54.130) by mta.arri.de (10.10.18.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.34; Fri, 12 Jul 2024 17:26:17 +0200 From: Christian Eggers To: CC: Christian Eggers Subject: [swupdate] [PATCH v2 07/10] parser: use SWUpdate internal type as master Date: Fri, 12 Jul 2024 17:26:10 +0200 Message-ID: <20240712152610.4442-1-ceggers@arri.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240712152253.3702-1-ceggers@arri.de> References: <20240712152253.3702-1-ceggers@arri.de> MIME-Version: 1.0 X-Originating-IP: [192.168.54.130] X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB5PEPF00014B94:EE_|PR3PR07MB8098:EE_ X-MS-Office365-Filtering-Correlation-Id: 82f606f1-46f3-4dac-15c5-08dca286fa03 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|1800799024|376014|82310400026; X-Microsoft-Antispam-Message-Info: ekXvR7B7iMzW7+2tg23JielXIFEhQv+v+zFwS9fOqWgd/b9P5LBkEJXRFzOsPNEXP4Tqhsg4A5B9IByJWIWFkbUEIUu01b1IaxvJ3ZKRy9lG/lmCzO3dr+Iwb6rM8vKYHURKUIsbsqcLI8UOgxxA+mGJ5gBOk9M3QMCHEz3wYGZd/XfxdIb+QIw4cyxG61EF14HJxIQ9KRcJNrnBWZsrE5kWUCfJjFWwLcG280xGT/oME/RkSybnLeII1/wXBfUX7iGWKoghRxxSpNoVltZHs2aFBf0kucmbIttrugfdizv55CMd/LS2f7EjAeijOEzVPhlhx7BVq+PhxbgAjnBEAaeJEzUbGSFDgw+k9MDtI9qStioKi2MP+jcYd+MS7/GgFyu93qgZlAEVsTCDCzsBYAPrHMupjBJ9xY4wJddyAz+nzq0Hj2tSP7AUvnUNUQxxyOsNmw7Jq43tKfRrJPpWetcTmkIhaC/cDZm+ayjjHFtBFyr0EkmJgzXAbu/LEoBxGffv0M4UpQ/Il6eWtpUm8iv0d/MoufOeF4FyMv1Izsb/PV5OEhaJWiEsTJ/gjM+guzHpjryP109An8csSCNjmNkprqU14OiStnwHIofvrgMdqoWrYEp/U1m3G43DTDAeeyDw29VG46uFr7PE5HkhDRrXDODicDcJW+rwHm134SdKGP9OIM5Hyv0SEu5EdDUf//pVf2M466LrdaeKTC0QVDSMtZAsO8KdAJ6zrE2Fj5gRG3+GTnMs1bZwMrij69DQafFJ3d0gabs9pKL21YL1Boj7aejhGngM0Z45FJyKy+k6e5ZiwlbLhIO5QAK1mMzDonN1MgJfXSzIOC4O/IpOEDYu6M1KUewPwaInfyCLj7us5bVM1XWZwPCglludhPd1RAJjJVqQKzCN7F/25/cc2AXkjhf1sXveBZP+vSVygvelUvvFQc6o4QH1jIBbeCXmp59MgrBmffXXAOd6XRMF6844zlK1r7qPK4Co2CJmJXjERvj+eO0psRT0P5VXYyLOwgt7VGXulJsn5fJqwSlOqI7PhKvGWhqwvl3W1V+KbLuukYpvZrK54ZCBbqwWHawCR8T0LeDYLcJI70yascGC8h4/W8dHFYTWTg42UrawYtDXVpYPbjM41m5eP2zanztyE0mwe8b7w9rmXXGzsGyJ6+VqfPiN9kjHUZGoEjDb20ZvRJytdwtVbELVrULAgY3jFDQuVfdNelvspIe9ankJj0a6AVem/VMtRyd99ENB2dLxCLE2kAXD1k9B9pEpOeZAtaQTPWwDkMflfCVJOmjUMKSd1KvnZk9npB6QMhFtoIGmt/3sfg+5Gm1jlzA279prAmsBPPfOVejGrX+7B47S/ShxGzx2xF60WAIUDzqJZdJPEk1G20cBrb4ZTkGQkVH1bx3tLg1QpJufbt23dr2Nb4xd0l3BGCoh+Qb+sKrVTjUyBF/8my6VJGoQJPAHHsxU X-Forefront-Antispam-Report: CIP:217.111.95.7;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mta.arri.de;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700013)(1800799024)(376014)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: arri.de X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 15:26:18.2966 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 82f606f1-46f3-4dac-15c5-08dca286fa03 X-MS-Exchange-CrossTenant-Id: e6a73a5a-614d-4c51-b3e3-53b660a9433a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e6a73a5a-614d-4c51-b3e3-53b660a9433a;Ip=[217.111.95.7];Helo=[mta.arri.de] X-MS-Exchange-CrossTenant-AuthSource: DB5PEPF00014B94.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR07MB8098 X-Original-Sender: ceggers@arri.de X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=szfa0Qt1; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2607::600 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , The 'expected_type' decides which type the supplied pointer has (rather than the type detected by the used config parser). So make this more explicit. Additionally fix pointer mismatch for INT64 in json adapter. Signed-off-by: Christian Eggers --- corelib/parsing_library_libconfig.c | 14 +++++++------- corelib/parsing_library_libjson.c | 20 +++++++++++--------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/corelib/parsing_library_libconfig.c b/corelib/parsing_library_libconfig.c index ea4b03a476f5..4442cefd3c07 100644 --- a/corelib/parsing_library_libconfig.c +++ b/corelib/parsing_library_libconfig.c @@ -39,20 +39,20 @@ static unsigned int map_field_type(field_type_t type) static void get_value_libconfig(const config_setting_t *e, void *dest, field_type_t expected_type) { - int type = config_setting_type(e); - if (type != map_field_type(expected_type)) + int parsed_type = config_setting_type(e); + if (parsed_type != map_field_type(expected_type)) return; - switch (type) { - case CONFIG_TYPE_INT: + switch (expected_type) { + case TYPE_INT: *(int *)dest = config_setting_get_int(e); break; - case CONFIG_TYPE_INT64: + case TYPE_INT64: *(long long *)dest = config_setting_get_int64(e); break; - case CONFIG_TYPE_BOOL: + case TYPE_BOOL: *(bool *)dest = config_setting_get_bool(e); break; - case CONFIG_TYPE_FLOAT: + case TYPE_DOUBLE: *(double *)dest = config_setting_get_float(e); break; /* Do nothing, add if needed */ diff --git a/corelib/parsing_library_libjson.c b/corelib/parsing_library_libjson.c index fee7bbe3ad7b..74db22fc63f1 100644 --- a/corelib/parsing_library_libjson.c +++ b/corelib/parsing_library_libjson.c @@ -120,22 +120,24 @@ const char *get_field_string_json(json_object *e, const char *path) static void get_value_json(json_object *e, void *dest, field_type_t expected_type) { - enum json_type type; - type = json_object_get_type(e); - if (type != map_field_type(expected_type)) + enum json_type parsed_type; + parsed_type = json_object_get_type(e); + if (parsed_type != map_field_type(expected_type)) return; - switch (type) { - case json_type_boolean: + switch (expected_type) { + case TYPE_BOOL: *(bool *)dest = json_object_get_boolean(e); break; - case json_type_int: + case TYPE_INT: *(int *)dest = json_object_get_int(e); break; - case json_type_double: - *(double *)dest = json_object_get_double(e); + case TYPE_INT64: + *(long long *)dest = json_object_get_int(e); break; - default: + case TYPE_DOUBLE: + *(double *)dest = json_object_get_double(e); break; + /* Do nothing, add if needed */ } } From patchwork Fri Jul 12 15:26:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Eggers X-Patchwork-Id: 1959940 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20230601 header.b=QyU2Rqgp; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::103b; helo=mail-pj1-x103b.google.com; envelope-from=swupdate+bncbdk7hq7yrekrblmwyw2amgqehzjt2ci@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-pj1-x103b.google.com (mail-pj1-x103b.google.com [IPv6:2607:f8b0:4864:20::103b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WLFnD2X4Lz1xqx for ; Sat, 13 Jul 2024 01:26:40 +1000 (AEST) Received: by mail-pj1-x103b.google.com with SMTP id 98e67ed59e1d1-2c98c453912sf1773409a91.2 for ; Fri, 12 Jul 2024 08:26:40 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1720797998; cv=pass; d=google.com; s=arc-20160816; b=nzshr8tdVraeDoqQfu7iaigdVhKstP0tsvAqG5JTk1K44QS7AHpFrmrDJjBqysMSES g6UPDWpjyH4UvZnKtmKhnCqQPkIDjq8d3zT1SSGEnBkyiZlsg5iPrGukd8JEdtEwRVza hA8J3zwkozxhLyRc81GBo1tIglgq/CUQ8IC4MH1hPflCssnrUX/zto+/kVi4+rEbeXHB PyNK7ETOrWmsxTMBVskx2KqzzjQuU3ZO2/xb5BHgmRptH8+Xg2fTX3Mbf7vd75FW29Q1 Qe1tBvZmr+2XBWiAwv+RwlVH2/ZH20lKG0/3eXdnlKfbB79u3HcFXCYOxu4I9ky2y+vK beEA== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=O2FbzerJTF7cVaUN8QermAlT5J8Jd9Q04c2LhoRZ7Sk=; fh=+I4ug5CROpIS8jcmECz9SgpHRKF56uAxAAJ94RShJeM=; b=bU3GWpT4hcG9nCRAwsQ1GyrS7r8ZUh/V4hdlCGjkOjuixKcph89kN/243Q+wVh06gf BZOdRQjQNbMpYfje5HDU2CwNDmBFZW0Fnkq65Ox6F4dvIuaVVirnBu/pEE5bVcIO0CYv D4D3vNhYbQtS7tKldMfhoySJCCQBlF4P7MVYsRi3l7b2cehdYC41GbV0uETq4AC2V8l4 xooSyZpIKgZQVb1uhH9fwkJsLj9z7fYzaqwmNM9MqZS+xAPpMO0osQdqOwApS7Cei5rN meWYRyPzJZwn4birERM5kmQbwUyIMxOZxsozulvR36LeNX3QDHe0stEeYgRVFvWisiQY gh0w==; darn=patchwork.ozlabs.org ARC-Authentication-Results: i=3; gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=B+Xhbxie; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2612::623 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1720797998; x=1721402798; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=O2FbzerJTF7cVaUN8QermAlT5J8Jd9Q04c2LhoRZ7Sk=; b=QyU2RqgpZBwdsSgFgkk+AkG7SmYSgm7hBy+HqGhOQgX0nXFd6xgebrA95jn/yBKg5e 2QbypXz74olbsgfNm+FSOslL/SgJG0AQfwHkQZshTgz2fSkbqZJS8GsjYBgQ42zlJY1e +1KvUL5MCMmNRqGzOJ0SlJJEdyMP97OfGR9qc6SDRF1RWkujkd7YP4cGl1lXBdArui2S cwrW1n1uVIheYGNtFCb+3aOrjk5nzc+schS1dnYwVBwBecdA5Kqv+cZLgyE7FtJvhUKr Ul1bDh4GoWgRDrat3X6XMspEawn+2hWwz5Gk8r0lUv7pLISEt1nMUB5UMpHIqazuYR8V MqVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720797998; x=1721402798; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=O2FbzerJTF7cVaUN8QermAlT5J8Jd9Q04c2LhoRZ7Sk=; b=ketpdnjGz2TgjFMcsk1a1fwzW+FW7l7F1Elc81Dzgl5OlbWLkYtJ2VUFSVTGbTPn8O /1G6n9rgQSa4I736LSn3eT7FP0k2lHFusKY6/UKpNNC/InguFh0Wit2eGQSl6Spckn+A jPUrAOhvaPsR0zn7XVx5g6xvc/syXi8tACcJBXUbvwfKcmtezQeIIenjTLaa8ap2gvck nnqTDoudfOf8UQMYeS4SZFTy3BGhvCMSTZtX6Dof6DcRurIT9IKMvxVTV+U8caZJmxmy 20/OB7mgqpwcrH6fJcCZiDSLZiIuwgSl2uljoPsSN2t0uCSquOfI4y/j3Sj2eqPv/PUe zJFQ== Sender: swupdate@googlegroups.com X-Forwarded-Encrypted: i=3; AJvYcCXfDQiRtUHwqRCUIBzQY4WHsK0vgkpUU5yDJH+oio/4rBoh0f+J3IJg9SziovFyAh7ldvEoD8lvb60quxpIHgAVWZ3G00oh1uvoW0xtnw== X-Gm-Message-State: AOJu0YxK8virT37W77RglnKnqZwIIMaiAjgSWDF15VYf44kpOeJ4GFEb pQgzRbswubL+ibUYXyHzYtUMYcuIC+aWiEl99CjyBwLaPRujIQur X-Google-Smtp-Source: AGHT+IEaMzY3jHRMY10Nn8/t39ymd5H7oTiyYzwTkFvr7rjIJci2N5RY2A2+jomcfG2QBJ3CfANnsA== X-Received: by 2002:a17:90a:71cb:b0:2c9:9b65:af4d with SMTP id 98e67ed59e1d1-2ca35bdffd5mr9444921a91.7.1720797998070; Fri, 12 Jul 2024 08:26:38 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a17:90a:d783:b0:2c7:c2a0:857e with SMTP id 98e67ed59e1d1-2ca9f96c702ls1062637a91.0.-pod-prod-05-us; Fri, 12 Jul 2024 08:26:36 -0700 (PDT) X-Received: by 2002:a17:90b:124c:b0:2c9:718b:2cc5 with SMTP id 98e67ed59e1d1-2ca35c299aamr9344726a91.16.1720797996293; Fri, 12 Jul 2024 08:26:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1720797996; cv=pass; d=google.com; s=arc-20160816; b=cw5Fvvs4Nb6nC2uW8P8DNTHaXAmBK+wwcCiqsJ1ekJR6+3xZGK1tfPE2j7LkTT/QJQ FHtLdCuFc4dPYQ96bfeSNmKaUZAFIl/pEfbSsYXwehAM3kerBxlkAUO7cFeBAs/geeSg jtddGv+Mj/niXZduQTlYIhphF9I63zfaLUbXk2LBrYmMjALUfCnzP+xECTSDMd8qQpV6 WYYtQtisA0qEoTiV+JcoJtDzwDccHJLZaDGe3YAeu6oiiGYyRHJmDUdnnJ+FXLa2eDXL 6tULOtLtikcK6kIJKWHhlP2RLzOtk652RaE3x6MBChxcEvWYg1caKh0JIiV6tWKAhGzH ZPLg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=TCDYAkRiCE6hNUpob1hxeMjYh+jMIScILoO05vbcWzE=; fh=Zaas7zo9QAZR51NXyZEDKjGEOyAL/jH6m/nrwgSdorI=; b=khiSvCFQBG1Reu+9JxOyS1tx1KqHx5tPZ+OxIzQIPRUbPkvKhTslMxq7C8FtmFNsHQ tKwB8aenLXBwoXEPfoZ+FLytRgFA+Ve/bQzmndZ5B3zMN/C7zokmeLarDCdlYK+D0ywY gDjLcoxlQ15kmZDfRiIzLt7fT1n7tWRhtXLfPovb1qOTUVcrLz5PQgE6XtNOw1LOIYZ6 nag9QIoRA0+VNuxbtHytIc+DtYSdAHxnhUipDn3d5wydQ08r+BSMpP8efdP5btx3+Wt0 fkNzKLCI9CV9J4uK8tfG2SR/Dfn7p5CIYJ7m4+7ex4Ff8hxhoB1AJ0WBUTVu3Upf2YCP 7RUQ==; dara=google.com ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=B+Xhbxie; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2612::623 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on20623.outbound.protection.outlook.com. [2a01:111:f403:2612::623]) by gmr-mx.google.com with ESMTPS id 98e67ed59e1d1-2ca3c750e78si623330a91.0.2024.07.12.08.26.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jul 2024 08:26:36 -0700 (PDT) Received-SPF: pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2612::623 as permitted sender) client-ip=2a01:111:f403:2612::623; ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=d9OOnF/T3CVw6TPfEXN5t53pZXPX+t94Etez3GzsTRoN0NYolnzja9nus+9clRC/KGFWxlWXd/5o5JrO8jhYEdwAU6318YuAq/7pvOyX873ynxtQ7SVbbJx17PcC5uf0wYtlbD6gdEh+50Qnl5dAz6GxKSpkjCM1bmXCS6KLvNJt/b6ojQ1f1I8xxoxKEfRJv/TyEkOyUzZvIjde99sN5VoTZIAy985BaqAAR3WWnYZZa9hDKUliU6pneC8Ieg9Wmyw7kZlLnK+/riziNbl7isTE5Uh/9ZvC8VSqZYjzY2zIwfpUIoWvY+nFmElGMiEctBYap6lZTfIfiAPKRhxdVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TCDYAkRiCE6hNUpob1hxeMjYh+jMIScILoO05vbcWzE=; b=xKxpjzIrqeFm1WEOGHQk/WF4AdoKsOORjyEILbW99EgJ9BilxgjEF4IMTg0SL6aG0QcxKh+tXwIgMmhFGJiWlN13Gk9v9HMEvFWKJh0XX0ASsrKhX060DHQkCvoPH00WwbSE6PWEGxkKpdZ24F0sO8iLgFpvVQeyGWaars4n8WdkyvbsGTU14XZ/PpaO7CNux4avgUEocShcIKxDv9qv0q1qOqZcvAEyDawQYFV5hfsdE21RC3QYXtRX6Ijw7Tl8fC7okRj8OGWwQmk7xFBfioOcNZuricIZWiQnMoW1TtHTHVbZhsh47Y3t85KuM34XGHux6eaWEwQ0TgtXwQHOhA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 217.111.95.7) smtp.rcpttodomain=googlegroups.com smtp.mailfrom=arri.de; dmarc=fail (p=none sp=none pct=100) action=none header.from=arri.de; dkim=none (message not signed); arc=none (0) Received: from DB8P191CA0009.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:130::19) by AS8PR07MB8135.eurprd07.prod.outlook.com (2603:10a6:20b:372::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.8; Fri, 12 Jul 2024 15:26:33 +0000 Received: from DB5PEPF00014B96.eurprd02.prod.outlook.com (2603:10a6:10:130:cafe::ca) by DB8P191CA0009.outlook.office365.com (2603:10a6:10:130::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.23 via Frontend Transport; Fri, 12 Jul 2024 15:26:33 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 217.111.95.7) smtp.mailfrom=arri.de; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=arri.de; Received-SPF: Fail (protection.outlook.com: domain of arri.de does not designate 217.111.95.7 as permitted sender) receiver=protection.outlook.com; client-ip=217.111.95.7; helo=mta.arri.de; Received: from mta.arri.de (217.111.95.7) by DB5PEPF00014B96.mail.protection.outlook.com (10.167.8.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.17 via Frontend Transport; Fri, 12 Jul 2024 15:26:33 +0000 Received: from N9W6SW14.arri.de (192.168.54.130) by mta.arri.de (10.10.18.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.34; Fri, 12 Jul 2024 17:26:32 +0200 From: Christian Eggers To: CC: Christian Eggers Subject: [swupdate] [PATCH v2 08/10] parser: add forward declaration for struct swupdate_cfg Date: Fri, 12 Jul 2024 17:26:25 +0200 Message-ID: <20240712152625.4615-1-ceggers@arri.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240712152253.3702-1-ceggers@arri.de> References: <20240712152253.3702-1-ceggers@arri.de> MIME-Version: 1.0 X-Originating-IP: [192.168.54.130] X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB5PEPF00014B96:EE_|AS8PR07MB8135:EE_ X-MS-Office365-Filtering-Correlation-Id: cbc927ac-33fe-4d8d-58d4-08dca28702d6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: HDtZI6+btdk0JVh3+mETpJFlupmsCQGzw8qzo7N4YsBeuxsTiUIIHGG8kTDUkFhlnain+FovmL/Fu1j259ngvOeaf/oyg/wEEfbOSdnRRF+iiATZmMTRLkXxE//SizvEAIbq4bdzwT/VEH3TejFl4szg4IoXnm5zG5xeCtV+l2mX4FgW2HXOnuD5qObx8J9FtkU5Pkj1lnRUGpvgkYJoyu0wBuNoJ8uR7RodZK2rtwiLPXtiTJc6toF4/cnKrGvXozG3c5J5FLb6mXQs1/Njp9qXW2h3QZUsOv7wUdcCxOH916FB3ppva5ZaNHTktQ+L/AqHY1TgxApfm2Id6ZIF9LigVsshEFGF9Fuh2sV4cIJUZIHibAVkIBmEi23WLImPYlg9NzzMbiRGvQYdyZtXAq/9vAAJXeonYz7rL26EVVgqs/Z885/nXnMSvHtkGdlytZZpkN002o/ahZJfs33+9Rp4OFKFhIT+Y1aFdpIGYhnZpeWzIbXomytVJ/86jWOOmoHy2Muv+qsBEaJ/8i9jz/nk3cht0aj3gF5gHrfcQeLmGq6eOCIEn0hhMuvfsrusZul8OoCBkCao5ELjgw+g0UioQNyjoKn/D/rh87/Sw08kCQWjVJF7igTkvCTah54evkFG/zT2PLYTsqv3kNm3nqaiuhZDBiXsxjop6YlLPym0VwcnHmYnsI+VynZFpjpev0vyMCG6F0Tee/b26h2QRcrvOXarXweBS8gl4OttxGaNKlBz3vzhTMY//R9rUFoxXOB2+RBLLYo0x3uvgCd9hC0Br3M5s7b2ZJbD4kIqfyYJ2/wyM2989DBwdxpklV97ZG8cGHJRzd6VGFVM+1pcVGdsZoOlmLiIJn3OyBdVWPo/5BJrwc+NhbasoX3+M4x5E2WdueNLIzBKWrW4OCcWkkUMQki/1yk7mdV2MAMRq/zHpPDGbUJr9OeMGiBqVJta3WDugK+Ajg0EKd4Toc/wZ5tmeXIb/O5juwtae7Q0itIMrtC7zzFiKB4pOWO9Z8+13FYWVz0B6i3pCUs5QS/IFzt08t+eUXhfAB333KqCvF+lVaXIYiK/lADFT8JJULp9zKxkPfQzqmf+Mjyp4kyyPbRWSMvnMcPUQLjCJfAmk36vhMheXJ7pSHLzMXCE1rCaEK5TkhvVNWhyrEZ6M0A9zoFcr8wXvQUOJKHgvPd/DhvGSTi9cxW+j3BTKbgDBPf0Mm3wcNWTWNN5pYbf5gB3QwHU+ko19YNLWy5aucpr6xeNWCAZYM6rZbUJUks4Tft9UNEq5UU3wnX3G5ulpPK0VE7NWbK20UaFBfjn6w7nEvbPyzLi/M6o5lBgAyS4MoCrTLdt17GRQhljvAT2uRja7BU9GY8ydfcIkrYfMJkelsDpz6/f3443rT6zXU3uoBu35yTp6ZLYx8kRvNsMfZERNTU+i9Qx/MV15rPaeRIvtLA8l57QtnvUZhnkAjhqtH5B X-Forefront-Antispam-Report: CIP:217.111.95.7;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mta.arri.de;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(1800799024)(36860700013)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: arri.de X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 15:26:33.0248 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cbc927ac-33fe-4d8d-58d4-08dca28702d6 X-MS-Exchange-CrossTenant-Id: e6a73a5a-614d-4c51-b3e3-53b660a9433a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e6a73a5a-614d-4c51-b3e3-53b660a9433a;Ip=[217.111.95.7];Helo=[mta.arri.de] X-MS-Exchange-CrossTenant-AuthSource: DB5PEPF00014B96.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR07MB8135 X-Original-Sender: ceggers@arri.de X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=B+Xhbxie; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2612::623 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , make parsers.h self-containing Signed-off-by: Christian Eggers Acked-by: Stefano Babic --- include/parsers.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/parsers.h b/include/parsers.h index 7d8abc1ff92c..a86c943b8890 100644 --- a/include/parsers.h +++ b/include/parsers.h @@ -15,6 +15,8 @@ #define SW_DESCRIPTION_FILENAME CONFIG_SWDESCRIPTION #endif +struct swupdate_cfg; + typedef int (*parser_fn)(struct swupdate_cfg *swcfg, const char *filename, char **error); int parse(struct swupdate_cfg *swcfg, const char *filename); From patchwork Fri Jul 12 15:26:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Eggers X-Patchwork-Id: 1959941 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20230601 header.b=avokHRyI; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2001:4860:4864:20::3c; helo=mail-oa1-x3c.google.com; envelope-from=swupdate+bncbdk7hq7yrekrbpewyw2amgqewvziezi@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-oa1-x3c.google.com (mail-oa1-x3c.google.com [IPv6:2001:4860:4864:20::3c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WLFnX2H0cz1xqx for ; Sat, 13 Jul 2024 01:26:56 +1000 (AEST) Received: by mail-oa1-x3c.google.com with SMTP id 586e51a60fabf-25e3350651esf1977232fac.3 for ; Fri, 12 Jul 2024 08:26:56 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1720798013; cv=pass; d=google.com; s=arc-20160816; b=UdpmDvCc54P6TlSNFs2Kl9+AzWoFqKvF2lnbmVBp1nCckkQIbQjHE79dNwg/KEJaE2 csu4b27PF7CkbLtBcL3tElPdODSTSQNVtrQo0EYa83dHFpvtlDzvxcocDZH/wkKcOIbX VOLqpj8SxGigb+20PfStWSid82R+J+IrPrvZTSh4TYN+Tq78DcFp8MYCJ9lXIKPxpJW6 vfCe2AjPZYRsTRSpUwdtVy6nXacwgetMH+AwOHxQF8uGb+MKPLmRS1+Pj7b82WgOPVjD baNzCiRkko1t1u/nI781Y0hWvVH744kOUJXG0Ym7FDZR47GSUFYF20Ye+/F3mPPXrk+L hD3g== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=W1M/5l+BE7wHKyGAzyJgrb7UR7d5Dn1zj0TTcvQTd2g=; fh=hXDhTOFEZp4HDepFWMGQzmdDYxVDrby2J5EiDoa6aqE=; b=jttoJvAQJ67Yaz+C1algW9uaq0haqjsMPN7SQHxYAWopm3AM4wz7A9q9VCAvHDurRc t4btzlsjS2Qms8IP3NYAANKJNqsYO9KiSKlvv1ssA0+62jeZdG4lOEKwiSj3vyf2HjU4 t0UyKZ96CYAAn22khitHKBBcTLCtcG7YfgOCQ5mqk4ZyX+KNm7ani4TlBvNyQ9vytdKj JZOZDLVJgX2hf82dxx34gys8EHFRws4J8DsHsKm6rTOXt1j36CSuWWWwfHDBAFkww8OQ kUJtncOJcAbOdjnyPNfe6CmZK+YJhxhyz9S/lNBUNPT07QIKDHxmSYz9UC07nLOOPxuZ SBvA==; darn=patchwork.ozlabs.org ARC-Authentication-Results: i=3; gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=rdF8J28f; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2613::601 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1720798013; x=1721402813; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=W1M/5l+BE7wHKyGAzyJgrb7UR7d5Dn1zj0TTcvQTd2g=; b=avokHRyIyK/01LDILyuer/3VGkr5L5zJkW7HboWmF294qRXlhL8hC4VaYWF44Fx0ON idyQDjRAUvfO8ctr8Uzh7DNxh4DY8tv/MhNctaF7o8tMpgjeoOVTjwwfsRZJh4nEhNlW WyAfW3IQR23xDY/u8SEjp37ZMZcXCFa+rTCK51PKGIxuVtqQOosAKtxYn3rBPOxX6Nle Exexcm8o0dXGLe4OB1vOQUm1VhbkOiO6BtmTSqhFNlmnBIv9IBGiuoxqW5U/9Xbtj5Q0 UJAzb9Utvj5sHasATUMBGZufWhRF8AjAcHcitCXC90fe6QYk9dxq+KIx29SYaVDAV8Nc 2T/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720798013; x=1721402813; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=W1M/5l+BE7wHKyGAzyJgrb7UR7d5Dn1zj0TTcvQTd2g=; b=YZq7/EfpxRdF5pwVZ28d0fx+iiCuwBR8RWSM39r4eSuD21hkAyYAjNJLzIHAqKn+XY 6Kr5QEek+9v84uXVZVOH9xTK5wPdKC8T0gzPibDUqUKm3h6m7LwXtHJzGRVhqaVl4mzT ShQMClnvKP8UXHJZWCfqohfMt5CZ2ayau804Ibg2b7ytnVNTte37P9cZAYAJgEScMwAF mQ3DUGx3rleFYDr8XMp5JSDwYbfFGx/8yYD9VzqM9rz2cqBrfk8Y3jRLTx8Sik9dJ9Ec 3xYE4QPEsw6z3WvJ0cxxAkHhhJx8hIhxlOOvROFw66z7vIDrAOqP/Hkd4GitovruW/91 pUjg== Sender: swupdate@googlegroups.com X-Forwarded-Encrypted: i=3; AJvYcCXdgRYVh/IMPuNqfWqkCkNgoOeKhPgMb7DpCml1zh10JNucQAszWuC9obcn/IB93gvvxUoklOsJfo8PZ1+B0g7rwqpm0xawLUoPNVI6xQ== X-Gm-Message-State: AOJu0YypxZoWOCMZQC1hDHaf8SsbJf0j+fU+pN7J2xYj6Xr4x3+mFEop f3MmgVbEO9lfBKb0+HCSRY4xobc7kYkdlBYKkkWIFBnJXt36bheL X-Google-Smtp-Source: AGHT+IGHf/EABB5jEnPjHSTkTYowfA9ba2gcnWRPRahIi45ldQgexJAugHY//O7P3MUAwNW/8K/DDA== X-Received: by 2002:a05:6870:40c3:b0:254:826f:a9d6 with SMTP id 586e51a60fabf-25eae7bb6d4mr9832062fac.15.1720798012837; Fri, 12 Jul 2024 08:26:52 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:6870:208:b0:23d:21b7:fd9 with SMTP id 586e51a60fabf-2603ad88781ls2088258fac.2.-pod-prod-03-us; Fri, 12 Jul 2024 08:26:51 -0700 (PDT) X-Received: by 2002:a05:6808:159e:b0:3d9:2e63:8313 with SMTP id 5614622812f47-3d93bedb47bmr13895068b6e.11.1720798011634; Fri, 12 Jul 2024 08:26:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1720798011; cv=pass; d=google.com; s=arc-20160816; b=R+ZtpnnAOa7Ty35aNmRtkhQrt7CkUapb9rvqvgyNF62y6AdDVZJerOiMnRUmlQr8xM Y+yNW29NQNKQzfn9xdNCYjSGUEAxPJAArpbdEAaPLDik/JITROuFJ1ZABWjSi6o3jnVq 339ZBlj9FCx0zrHoNBfqwHV+/8RDpOMbTUMlaTdbgrvXqOZ09VFh4RuGu1X4HzHz9iZA 2Xswyb1WWFbR5J0IBLnLK6+pokJoNGJDVCGAEjL5OKhO96cUnra5X/p1D9f/bX8kw51g 5vgAm/Uyhm/bCw/aQ8HZRQizizo608Dl8iqLQrX2n89lZU3Itb1/zxZaDhqJ9DSF9LXo q2Dw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=0XMylsbBKMefxyxS5S4e9kOpF5uoAf8O1lCWFN+lEO0=; fh=Zaas7zo9QAZR51NXyZEDKjGEOyAL/jH6m/nrwgSdorI=; b=T25Za0G0tPTsmwX445ZvtDvyLlKipveRuIsSlJmDVoLtUrhrW4snePa+y9mQDPK8h1 /ofHDMuJ81jqoxXfWVUPk5ITgbucKxVi/2hkOYwIZ2w4vWTQ/9y9TSw6HrnmXZp9znZG fgx8Y04KKjnmTr3RguHjWdkhIm387rfOIwKFAVYR4tEBa/Ab7XESaNNr512qy2JQ4F+y HCpi7jpN3GKOlxp9QerMIvOSfLp1K+mD3wJRZEx0SAJ2qnyTMAqSytyOvOASnjI9RGX4 oOQ3cXss3ylNUm0ycwQYhlI9LyFFMUUfD1ToCY0qDtbc3/UBWgQmbKTsqz6kRugyDGFk ncKw==; dara=google.com ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=rdF8J28f; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2613::601 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on20601.outbound.protection.outlook.com. [2a01:111:f403:2613::601]) by gmr-mx.google.com with ESMTPS id 5614622812f47-3d94d7b2ffdsi296901b6e.1.2024.07.12.08.26.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jul 2024 08:26:51 -0700 (PDT) Received-SPF: pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2613::601 as permitted sender) client-ip=2a01:111:f403:2613::601; ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nUuUtzmDcce8+ZeSzr2dZ6a9egnfPLonkR4dAlDZDTntNuLKaLqzN1C9wFq9Cju/E6/XxmCXEtGn3sXYUCmF4e19TB4NgS6kGJPEZ3SldOf14V0+E79IuS7D/TwdaZksK9A0sCq73URig4FUOcM3UIfNoq9AENjkUgJ9eJomJ14VISDSFbZFHWteCDz5vUHWnDIkAqsDGVoO2uK/xeZrGatX1SFO+w2bQbT3OdAVtuf9kC1porddnM8RWBT9cXsOe8Yt9m06wqp4H08USaP2KbU+AkrutZd2cw1nyTLwe9EaTwPdvTUCcoVlwP7vQsz/ec3MsEcFeADvkNVa1lo8fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0XMylsbBKMefxyxS5S4e9kOpF5uoAf8O1lCWFN+lEO0=; b=LdQho4Ygce8Tqo+yZITOmJhHkiQSW22IeKLus9iXmukCh1HprOXQK8OvJGoT3dM6CMiCOpqzythZyFVb5Lc9imuVdd7POFakXTwLSNJbmwwq9W9XcvrMQhSg3OX8n5n27nZQNYoji9JRU3bDqeHXgXecNLuWaMFK+am5p8zB22a/6dK3nX9CW76MhKvmdoaBwd6iFKyTUMqhNhMWBH8VjKOFBe15PZzfXauppyER5gAxYvBJVTiNNBQKbXlP1ifCPDS2eGMRgJmUGWwIlPK2UoTFUo3TchrM0CLmsQdgefR3kOnmi3Jv/A7aglOesiV06+B3ZFp4KmpzO44H9Qr61g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 217.111.95.7) smtp.rcpttodomain=googlegroups.com smtp.mailfrom=arri.de; dmarc=fail (p=none sp=none pct=100) action=none header.from=arri.de; dkim=none (message not signed); arc=none (0) Received: from DB8P191CA0006.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:130::16) by PR3PR07MB6954.eurprd07.prod.outlook.com (2603:10a6:102:76::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.5; Fri, 12 Jul 2024 15:26:48 +0000 Received: from DB5PEPF00014B96.eurprd02.prod.outlook.com (2603:10a6:10:130:cafe::d9) by DB8P191CA0006.outlook.office365.com (2603:10a6:10:130::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.23 via Frontend Transport; Fri, 12 Jul 2024 15:26:47 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 217.111.95.7) smtp.mailfrom=arri.de; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=arri.de; Received-SPF: Fail (protection.outlook.com: domain of arri.de does not designate 217.111.95.7 as permitted sender) receiver=protection.outlook.com; client-ip=217.111.95.7; helo=mta.arri.de; Received: from mta.arri.de (217.111.95.7) by DB5PEPF00014B96.mail.protection.outlook.com (10.167.8.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.17 via Frontend Transport; Fri, 12 Jul 2024 15:26:47 +0000 Received: from N9W6SW14.arri.de (192.168.54.130) by mta.arri.de (10.10.18.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.34; Fri, 12 Jul 2024 17:26:47 +0200 From: Christian Eggers To: CC: Christian Eggers Subject: [swupdate] [PATCH v2 09/10] parser: print warning in case of type mismatch in sw-description Date: Fri, 12 Jul 2024 17:26:39 +0200 Message-ID: <20240712152639.4685-1-ceggers@arri.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240712152253.3702-1-ceggers@arri.de> References: <20240712152253.3702-1-ceggers@arri.de> MIME-Version: 1.0 X-Originating-IP: [192.168.54.130] X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB5PEPF00014B96:EE_|PR3PR07MB6954:EE_ X-MS-Office365-Filtering-Correlation-Id: 98f2f0c7-8c07-448f-3e9e-08dca2870b9c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: eakj0/uGkJhPATJ47eA8gYvHJ5pr/JNTZpTZXV7Nh0cLUk16YVUdfd0wyXX9KUz/+fhpV7FgJ32elhSr4MAfi/zihHnDTtVLhawkEZdOyO/70hlLYPx17SGjlDtaZi3IVQFTZKIHzb6Smn2mdy9CV9364iBPd6WCR17HoBwTFFmOcYeB0MLFsJL5nfFwByjGbEO/cFdzWrJUdaYsJ1TG6Pdgyxlp5XN90r/7ZPecUFuYoh+aAlWR24uH2JMVRcGnjvodlG2pAA/8iJpPYlUE81exUj3pD4LnRGDTRx9oP6/f281ybWxiJCRPh55nt4yYO722uWNxIT4RyU1F7yNfD/l/vjZgPAYVxC8NcsAZlPJpNol92rlm/eWfJNAxgwYuk5C49ZK7/I4GdfZOzCYhiLYwlfz2YvDRO7vsTNejoC04gZcXRsKbWKgoIokihWMucQjC69hY5Z8ok0wWNiwWZZBOFuWw42ZGagm6S7JXD3iFUIrDKSX59+tujFLpaNqF6s9sh1NoxYf2p+o3ZBtCgmyJGmWNbtF7esIugtThjusFXNPTY+PGYu1WK6eblWQmbZz8wHW3UFRfBYeqo4447EgHjLWkrCF6J7HYynVPiTuKdi2inxY1MlyJ3jslbiNhbz0Db8HaSuMuCyDkSqr8HWD1coa3+YgwsG7lIepWSXyEdaPzG/ZiB19YghofKw37DHM4pI3Fnt/csiTszQrg7fwlxm5cBmaqDZJDa68YEtk/74sUnZDZKtGc5sZV7jskS9bV7uxP6dQYWIncKytpbIoEC6RD1JM4Z0CkyCYRNILpPMMVFOs6XKSKN0HwNLW/7AkPwlVKsGI6uL/n3bwA7k1ENYEvknC05oX9fnp34mkncbeVWsPij8VXLCfyZgrI4IbVqIi1KlS5PZkyw4X8F9hAQ/QfNM2OK+8aQaLwdlm4WdcUWu8ez64KNZfB66+uyEnXy9wD/AsjR+hHn2NKe+Wi88TiGlxjrnx2pN0kkLC6TNke9Nkz2+RIqCGqgMYNZu+jsPUyOUBiyyKJUcafSyspM/jFcKcZky0Oyr7Dh11+CUOs1jOTtl3R9FK+4jOyvx4CKzG2+3/wDwjf7g4PKfzQkF7aeAaNS5Jd9rHhYanm+6ZUXEvslLn2vIBChf/cfVEElh53KLagtt/Qfh2AlNYKld83pxBr6FBAf1u4KzERBQskxBUYuXCOEdrXTaZ2EaNESIGJl5yt6gu/eT2ybxwRoHYv2XoFKEzXr/ps4uB07zAMlPXELO1CLN9/xOmmcENu+4IefvXKf37TMuuEE+LuF+EQfnNj36iZ+kuxEJnBSq3eTGZ7JXzjC+CqOwuqS5f07noJc57qYz4CghxYwBHbVDir7LlGNyxzpbk5hpw11Ru2dnKGCkcYH5Mm5pcpDEaDXV+n5Tsn5+WM7aJdWPSxgBmv0KDfkik6UspTmXabbmQ/ZXSazPuPcFSIHodI X-Forefront-Antispam-Report: CIP:217.111.95.7;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mta.arri.de;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(376014)(82310400026)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: arri.de X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 15:26:47.8060 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 98f2f0c7-8c07-448f-3e9e-08dca2870b9c X-MS-Exchange-CrossTenant-Id: e6a73a5a-614d-4c51-b3e3-53b660a9433a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e6a73a5a-614d-4c51-b3e3-53b660a9433a;Ip=[217.111.95.7];Helo=[mta.arri.de] X-MS-Exchange-CrossTenant-AuthSource: DB5PEPF00014B96.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR07MB6954 X-Original-Sender: ceggers@arri.de X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=rdF8J28f; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2613::601 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Print a warning if a value in sw-description doesn't match the expected type. No assignment will happen in this case. Signed-off-by: Christian Eggers --- corelib/parsing_library_libconfig.c | 9 ++++++--- corelib/parsing_library_libjson.c | 11 +++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/corelib/parsing_library_libconfig.c b/corelib/parsing_library_libconfig.c index 4442cefd3c07..e99fbe9dfe9a 100644 --- a/corelib/parsing_library_libconfig.c +++ b/corelib/parsing_library_libconfig.c @@ -17,6 +17,7 @@ #include "generated/autoconf.h" #include "bsdqueue.h" #include "util.h" +#include "parsers.h" #include "parselib.h" #include "parselib-private.h" @@ -37,11 +38,13 @@ static unsigned int map_field_type(field_type_t type) } -static void get_value_libconfig(const config_setting_t *e, void *dest, field_type_t expected_type) +static void get_value_libconfig(const config_setting_t *e, const char *path, void *dest, field_type_t expected_type) { int parsed_type = config_setting_type(e); - if (parsed_type != map_field_type(expected_type)) + if (parsed_type != map_field_type(expected_type)) { + WARN("Type mismatch for %s field \"%s\"", SW_DESCRIPTION_FILENAME, path); return; + } switch (expected_type) { case TYPE_INT: *(int *)dest = config_setting_get_int(e); @@ -120,7 +123,7 @@ void get_field_cfg(config_setting_t *e, const char *path, void *dest, field_type if (!elem) return; - get_value_libconfig(elem, dest, type); + get_value_libconfig(elem, path, dest, type); } const char *get_field_string_libconfig(config_setting_t *e, const char *path) diff --git a/corelib/parsing_library_libjson.c b/corelib/parsing_library_libjson.c index 74db22fc63f1..9635ac2a0c2d 100644 --- a/corelib/parsing_library_libjson.c +++ b/corelib/parsing_library_libjson.c @@ -17,6 +17,7 @@ #include "generated/autoconf.h" #include "bsdqueue.h" #include "util.h" +#include "parsers.h" #include "parselib.h" #include "parselib-private.h" @@ -118,12 +119,14 @@ const char *get_field_string_json(json_object *e, const char *path) return NULL; } -static void get_value_json(json_object *e, void *dest, field_type_t expected_type) +static void get_value_json(json_object *e, const char *path, void *dest, field_type_t expected_type) { enum json_type parsed_type; parsed_type = json_object_get_type(e); - if (parsed_type != map_field_type(expected_type)) + if (parsed_type != map_field_type(expected_type)) { + WARN("Type mismatch for %s field \"%s\"", SW_DESCRIPTION_FILENAME, path); return; + } switch (expected_type) { case TYPE_BOOL: *(bool *)dest = json_object_get_boolean(e); @@ -164,9 +167,9 @@ void get_field_json(json_object *e, const char *path, void *dest, field_type_t t if (path) { if (json_object_object_get_ex(e, path, &fld)) - get_value_json(fld, dest, type); + get_value_json(fld, path, dest, type); } else { - get_value_json(e, dest, type); + get_value_json(e, path, dest, type); } } From patchwork Fri Jul 12 15:27:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Eggers X-Patchwork-Id: 1959942 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20230601 header.b=Wm2uvh1L; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::73d; helo=mail-qk1-x73d.google.com; envelope-from=swupdate+bncbdk7hq7yrekrbv4wyw2amgqey4yljri@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-qk1-x73d.google.com (mail-qk1-x73d.google.com [IPv6:2607:f8b0:4864:20::73d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WLFp239Zwz1xqx for ; Sat, 13 Jul 2024 01:27:22 +1000 (AEST) Received: by mail-qk1-x73d.google.com with SMTP id af79cd13be357-7a141e44419sf288326585a.1 for ; Fri, 12 Jul 2024 08:27:22 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1720798039; cv=pass; d=google.com; s=arc-20160816; b=EcX6dESLw4JyY+N1rW3FogJKF8lOr+jTo8mR53M48RTKEdwH3abGHH3RdUbJdQC/Rm L4dsHLgwB6SVg5cSoDqAkp1Yzrsc1Gjdb67sjIhY9B/ZFNySxiBxXDVFc7m0l1yNqtce 4dGVJN15Es32V1c8idkLEGkORf5vnsbEN5D2IRrnTLIDflkbWvISJNDJRWx2t2D3lZQZ F0nRceleIvGy7+3FvdzjPmI81t+9cD9UXnS2LYcyn+lcgvWXrG+7iqq0FPDWFLNzhZC1 CG118zDmICTfg5JuEaWlS44fUF2vRfY8t8BvuXidohBlTTT3l+teVGJfVYiLYYWRccMI QVyg== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=4vbkQ8DBxWwXFs1A2sMPgk9KMeJk9w3cN5WsGTgunNg=; fh=bUS6kkpAdSVZCoa3a9O0aCAuoH1+TdUHISZ8bvOTVFM=; b=cBIjojnkguXN2m/CXij8Md/sSFxe/fwvae07BVSBfTioE66D9uWnkAXD4I3GnDe9+Y n2kYMHlpEbHDhJX0sOxgljTyeDdK8jX2g+JQdZg+az+Pt6SJLN4e2YBTRvYSUImx93dr d69gH9BPxTPvGN6AFemCg/aC3ECCm7SdVjI7kBxkbOCaIF1YrIcst32q7J/0qQBKCMmh c4djb57wYihJFUpKddNs70IJ2x/xnh4f7NdAIl+BTNVOUdvEUHNffhyzykKJkRw/CajC FoRu6t5agLed6xsVQgipm316D0fUShGPGxaZ3jz9L10S0Ai1wORuiUn6k7QpFzs8vKYf xPLQ==; darn=patchwork.ozlabs.org ARC-Authentication-Results: i=3; gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=pwq5zc5m; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f400:7e1a::601 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1720798039; x=1721402839; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=4vbkQ8DBxWwXFs1A2sMPgk9KMeJk9w3cN5WsGTgunNg=; b=Wm2uvh1LWpyo5s84AkqJO1IszRiEwMWJfG7o0r0BHsbqVnD5W9GJCmXY6/NxoOSTNE imAOX6aaEuz7vjtkx3gHBAKspoOYrkYPPsgxm5cCNVU4ykf3+MaR1vSeorrvWe2HvOze /iMFx+NiU7q96eBSRUpWf7wusaJNdxLu/Q37C43/xMS6lPfS+Ux7fkNi/BbhE0ptmtYX wjHLpXR8lLn5FWOTv85RYVV/Lj0x6kn3QT/GvnykZxY4Mt3pMUT2lW/7d78QoTpTPoSf uZcz/ne0Y4v54umxd8r7+hCCF3fofVikLLwwisBvVzJVoo562AOLSTSONEyfy2cprDYk bLvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720798039; x=1721402839; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=4vbkQ8DBxWwXFs1A2sMPgk9KMeJk9w3cN5WsGTgunNg=; b=PzZiDamy5ikPNfpAbBtePKp+TDilw2iW62e4HIK/5cRBfeAxssQse0v1mTb5FLaVKF lm2x1wr39u/OnFq2S4TeliTxcvGapCAGw1fHzb+bcg1e9Fru/O52h5dknz4xQRvFDNAF 4uAHutjYRI+Aj+Bmbc7d3S1/Wt0TLWViT40Mk4LlsDXg4T5A73ro29tEWBjxYAdmUSld KPeO3EVb+T+Xc5ObcWK1Enda/wcdGHAXKS471MAPAPJDVYlwu00BKynswv16UI494mD/ H0Pn3APSahjkA4LLODkpEIoOSBH1LY+2RSyN8LWTAFPsMmIMQbNej64s0lC/lHm0BqOI blRQ== Sender: swupdate@googlegroups.com X-Forwarded-Encrypted: i=3; AJvYcCVbWV19l69fx11SkrUYw5/87vpJWVTRKIx3WIuKOptvcyk5SiVAdfW+OebuOQ7V55zFnmbxOughaplb5fvh0epAcgMWNDc1OHqwmevZnQ== X-Gm-Message-State: AOJu0Yzl/Oq0K3sVbIXiPzPtqaLza8w1GT4NPUCmZxQJu2BjaJr2mt6T BmhaLCWikMuoGaSUWGc3wArlHl6qDf4CHqi1uKjWk2mhVBgB/Tg7 X-Google-Smtp-Source: AGHT+IHxQtt64wOI3Jzu6tSyiNgcn4FLQwY9dNqvxN0ItVAEZUvMbHYA5PcUmLSLYs69/WASnI7b8Q== X-Received: by 2002:ae9:f44b:0:b0:79f:78a:f46d with SMTP id af79cd13be357-79f19befb60mr1169817485a.65.1720798039556; Fri, 12 Jul 2024 08:27:19 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:ac8:724e:0:b0:44b:e6db:de28 with SMTP id d75a77b69052e-44d0819c6acls29427721cf.2.-pod-prod-04-us; Fri, 12 Jul 2024 08:27:18 -0700 (PDT) X-Received: by 2002:a05:6122:910:b0:4ed:52b:dd29 with SMTP id 71dfb90a1353d-4f33f237cb9mr14210561e0c.3.1720798038258; Fri, 12 Jul 2024 08:27:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1720798038; cv=pass; d=google.com; s=arc-20160816; b=b2evxzrkxUR9HbONYkfyfey0d1WBUb1IcstkNpDCk1+HfDs3Eoe6ycj/VGg2trO+wB duJnNqEH+TgwHY7nilhUBmqbFAyisDU1L2G6XNGWp8HoMRDGuF/CVZrRBvjFdrTsJZhT hlm95l3MLSSVW3UDl46i2ViusBkNkDyptzjHL1IspxAYEeSjsbP5ro1MZ3pjjuiOpdvV yGr8ysXvZkmQ/ejhUSOiIY6Jj0j462KSG+ysZt0+yF7Hm81xLaqpDKkLq2/1417ida2f qRRjuLfgjMFbU35bldgP8E9zJeuQ6ShyFwBdxtiVPIIKVIuzi6DOI8q9cqo7ev8n7BGS 8eyw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=LhJlGqap8rG41rsmfrgDlTMxnxOZ1o0WXGH+ZDqa86A=; fh=Zaas7zo9QAZR51NXyZEDKjGEOyAL/jH6m/nrwgSdorI=; b=Lui5KWvB7gHcT5m2BEWHXY0Py+kXUk6cPPgif6KHEP2Zl1bAZ5aULx5ebU4m6pFD2W E0Be2bHzcusU5throEufZv7DRjYOEqs7BzNa8eay7aDi/2kZyzjGd9tkCdCozENcC5Oy wmvfqWscs7PrqC66ie1sbmGRHDc9h8TCk9G7FqaiF72eU+cH1CqW8cdXNHyFhjWxhvEL wugHYZWU+ikrVGyvevn/6YghRX049PNZIwyhvgySyZgEwlAUSQDPhlWojWZLZceHf5Nc KYOmaW7tf2Ol7KCwVDxz8ZsWgMLrCsgcpLvxyjEKFt1xcoZdt1gUVn1KYNonQZzc8Sqa WZ3g==; dara=google.com ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=pwq5zc5m; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f400:7e1a::601 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on20601.outbound.protection.outlook.com. [2a01:111:f400:7e1a::601]) by gmr-mx.google.com with ESMTPS id 71dfb90a1353d-4f33da10cd6si655930e0c.1.2024.07.12.08.27.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jul 2024 08:27:18 -0700 (PDT) Received-SPF: pass (google.com: domain of ceggers@arri.de designates 2a01:111:f400:7e1a::601 as permitted sender) client-ip=2a01:111:f400:7e1a::601; ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vQDN3VpUcrLqBhdCstP8ZLOnWEaFhvWc8q/g9ive/K7rcyBkeX+MWygVnZICcLBokBWNblGyZrs5mrSadhVlr2irhbX3buMqva7eJejAjXs4BxDisrYlbZxafO39BpT8BBY5l9rnlZbmeVtztW8IyyZ1vJLGxG+0PAbH4tWp/jrx7IUCIz+uJFDqUMwYVV0iC4k40HrIvYdA6cg3o2DgemXNzidGk2YKYBAIsTQychh0GVeB0Arqq797oV99zbUQtIhzSejf7qRsX2gU8dJmNahOaDTGJ5mD3BLU2dm7kD7XVFsDoHswCKg+ttub6V2j3GtPPRGoXXFM3Q5C/eaHjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LhJlGqap8rG41rsmfrgDlTMxnxOZ1o0WXGH+ZDqa86A=; b=UbGMqCU43ClBskQSLrYS9TNdzs0TdMVI699Lwav3mjAJ9mUhO7re9G1Z5t7Ent6aMpk7am69vNxUyFpb2lrjOTWuzbq0v6YlfaLmuj8Ep5SqHhi7Lw5vNhNxFqCKXIVrNtnpbh7B0zfbohvR19oeSQEBx13E16TOv1XHBVUQhZqiqGafnH6kA4NXH4RPI12olzrmUjmTNk7+4I1T8ubcAyWH5Z50bBe3q5L26LcLW4KlN1k3XwHhaFZieNHAmPFN+MBMlEDWk50bkUccf76yeQf0FfOUBx9EXcvcgff0drbtqJvPLyNu6hxWjuQKj3FNoLme0V2RUwgKBXGXlzvVHw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 217.111.95.7) smtp.rcpttodomain=googlegroups.com smtp.mailfrom=arri.de; dmarc=fail (p=none sp=none pct=100) action=none header.from=arri.de; dkim=none (message not signed); arc=none (0) Received: from DUZPR01CA0009.eurprd01.prod.exchangelabs.com (2603:10a6:10:3c3::16) by DB9PR07MB9344.eurprd07.prod.outlook.com (2603:10a6:10:45e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.6; Fri, 12 Jul 2024 15:27:11 +0000 Received: from DB5PEPF00014B97.eurprd02.prod.outlook.com (2603:10a6:10:3c3:cafe::68) by DUZPR01CA0009.outlook.office365.com (2603:10a6:10:3c3::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.23 via Frontend Transport; Fri, 12 Jul 2024 15:27:11 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 217.111.95.7) smtp.mailfrom=arri.de; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=arri.de; Received-SPF: Fail (protection.outlook.com: domain of arri.de does not designate 217.111.95.7 as permitted sender) receiver=protection.outlook.com; client-ip=217.111.95.7; helo=mta.arri.de; Received: from mta.arri.de (217.111.95.7) by DB5PEPF00014B97.mail.protection.outlook.com (10.167.8.235) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.17 via Frontend Transport; Fri, 12 Jul 2024 15:27:10 +0000 Received: from N9W6SW14.arri.de (192.168.54.130) by mta.arri.de (10.10.18.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.34; Fri, 12 Jul 2024 17:27:10 +0200 From: Christian Eggers To: CC: Christian Eggers Subject: [swupdate] [PATCH v2 10/10] parser: libconfig: allow implicit conversion from INT to INT64 Date: Fri, 12 Jul 2024 17:27:02 +0200 Message-ID: <20240712152702.4751-1-ceggers@arri.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240712152253.3702-1-ceggers@arri.de> References: <20240712152253.3702-1-ceggers@arri.de> MIME-Version: 1.0 X-Originating-IP: [192.168.54.130] X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB5PEPF00014B97:EE_|DB9PR07MB9344:EE_ X-MS-Office365-Filtering-Correlation-Id: d62681eb-d4bb-44a5-dc13-08dca287194b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|1800799024|82310400026|376014; X-Microsoft-Antispam-Message-Info: lvOueZCmJaKFQ/HCZIpLx804Sqr520R2IzAQRbWPuBNmM6hEJGWD9NN4JG8oalphc0PPFb9cLdFRJFLXLwdgJuaXvkRaDRmFgfVV8dt4jy8Shn7Pd8aC8wCdt2cmSpfmwOdtPVJD2hzmePQqPnCT9GSB0GQJ/y8TcuZIb805cEwlvn0xGC3SE+yIeal+ZbSwu8kbuB27NC7br71PZ/sGCOeYj5akjxzlT79uT5pVceTJupWoOqD9hRlqUmfkxuGLvOhD+SBhZ1JrFdMZvWhutRouUzytCyNGJ/kORq0fS0n/AifnBceOmyUuBhd0ZPUZSkpDnvv3jtbtlarfQpbxu+uqbwKRfMWkbw2XQ2RjfTWeRTcpsIxeYzlwHkixC0aaaKqKrwCmK+69mmEhEhgY5CohLXVyi7FXpWqHoDiFzK0jyW6OyQ/7uIVOYPQAqPYv5htyoHpcKuwDASCn+mw3Mrsjw3GgRl1skVf19ere0vQCPGbhPK2d1K7SgkpUrk9aEIij9wz/jOQyj22yMksZUY00I0rX59J0JcI29UD+Lw2EevLwAwZZFFdS7Diu6nj3WEEARzGT3KgloeUfVg3/6ibnVPca2IYlQG2NK1/I8hh02x3JVRpwQ95eIw34TDxdIpGkx3ImeqBFLeQG7ghsKjnhw6zwBoonESj0KNBBFHWWLQFawjoc6S9tgCKCLuHgc8PfLTA3KVt6P5iaw7hqOfALcSdnnYeZeZvGFpCnKT3tN8bgEUf2DiLqqUjZRQ48SIKKWSeMZCwmB9yKaq+cNqMlMxvC6YGXQffjn8hlVsts5+GyWifDRIf+SbHc3dNPjvhfjoyl07Ow4zRCL9A2AZZwe1urkGuskxYAZC4v5dMZ+bpkFSYrRPvTf0tII66MJpGcljc8+Hqhik1IcCUlXCDdtaMcMuzZgL2S2cQ9FzVaIzfCLt3sqExNumHExXKWN8jjR1AMoWsmLHkriPmDERzaCr3lqdVJlC4VCiungMgeblxbfU7pToRckXsHiMi++KLmz2ldxhWJIVc7XddkU/qxx2d8qIRdmFyNx0YPydAtuw0j79/Kol59j4TW/ao8CwLiNeyQCjyldHkmSbFtns7z3sxW3ofw89FETE3GJYwgfKcYRip6GipDCirv2gBVUFv+hvD7J+ZCrRQCtrGQC8kZdgi/6jxdIhRCVpqbupOwwHzelwK1xCLIS5uEB3lyzaUDPRczuAYd4AotqWLh4M0Z2w79HPXnKZOT3eShXQhlgqM3cr/MnDOG9O8+WPvjNLORs2pQ3v9nNeeANfP7Bvh8bBv/UR4VOc8JddhbGQ0/rhOzLGRty8XZf5XqY01a6mHhySHkTwiQ93l0F/Y1x3f8gebRcTR3dLV8e4SZmcfDB7+ZFH+1jNWM/aLURBnR X-Forefront-Antispam-Report: CIP:217.111.95.7;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mta.arri.de;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700013)(1800799024)(82310400026)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: arri.de X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 15:27:10.7829 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d62681eb-d4bb-44a5-dc13-08dca287194b X-MS-Exchange-CrossTenant-Id: e6a73a5a-614d-4c51-b3e3-53b660a9433a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e6a73a5a-614d-4c51-b3e3-53b660a9433a;Ip=[217.111.95.7];Helo=[mta.arri.de] X-MS-Exchange-CrossTenant-AuthSource: DB5PEPF00014B97.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR07MB9344 X-Original-Sender: ceggers@arri.de X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=pwq5zc5m; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f400:7e1a::601 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Since 1db0aefe57de ("Enforce type check in sw-description"), GET_FIELD_INT64() does not assign a config value anymore if the type detected by libconfig differs. This type check needs to be slightly relaxed to allow assignment of parsed INT32 values when a INT64 is expected. Otherwise this would require conversion of the sw-description in the .swu files which breaks compatiblity with existing update files. Link: https://groups.google.com/g/swupdate/c/UeALEHCAusQ Signed-off-by: Christian Eggers --- corelib/parsing_library_libconfig.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/corelib/parsing_library_libconfig.c b/corelib/parsing_library_libconfig.c index e99fbe9dfe9a..8f227aa872e1 100644 --- a/corelib/parsing_library_libconfig.c +++ b/corelib/parsing_library_libconfig.c @@ -42,11 +42,21 @@ static void get_value_libconfig(const config_setting_t *e, const char *path, voi { int parsed_type = config_setting_type(e); if (parsed_type != map_field_type(expected_type)) { - WARN("Type mismatch for %s field \"%s\"", SW_DESCRIPTION_FILENAME, path); - return; + /* Weaken type equality requirements for INT/INT64 */ + if ((parsed_type == CONFIG_TYPE_INT && expected_type == TYPE_INT64) || + (parsed_type == CONFIG_TYPE_INT64 && expected_type == TYPE_INT)) { + /* ignore type mismatch, handled well by libconfig */ + } else { + WARN("Type mismatch for %s field \"%s\"", SW_DESCRIPTION_FILENAME, path); + return; + } } + switch (expected_type) { case TYPE_INT: + /* libconfig handles also 'L' suffixed integers as long as they fit + * into INT32. Otherwise zero is returned + */ *(int *)dest = config_setting_get_int(e); break; case TYPE_INT64: