From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6B352C4332F for ; Tue, 20 Dec 2022 19:28:46 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7iGz-0004ay-RG; Tue, 20 Dec 2022 14:27:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p7iGy-0004ZP-3w for qemu-devel@nongnu.org; Tue, 20 Dec 2022 14:27:32 -0500 Received: from coyote.holtmann.net ([212.227.132.17] helo=mail.holtmann.org) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7iGv-0002Z0-U4 for qemu-devel@nongnu.org; Tue, 20 Dec 2022 14:27:31 -0500 Received: from fedora.. (p4fefcc21.dip0.t-ipconnect.de [79.239.204.33]) by mail.holtmann.org (Postfix) with ESMTPSA id 50B14CED0A; Tue, 20 Dec 2022 20:27:25 +0100 (CET) From: Marcel Holtmann To: qemu-devel@nongnu.org, mst@redhat.com, xieyongji@bytedance.com Cc: marcel@holtmann.org Subject: [PATCH v2 00/10] Compiler warning fixes for libvhost-user,libvduse Date: Tue, 20 Dec 2022 20:27:12 +0100 Message-Id: X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=212.227.132.17; envelope-from=marcel@holtmann.org; helo=mail.holtmann.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org The libvhost-user and libvduse libraries are also useful for external usage outside of QEMU and thus it would be nice if their files could be just copied and used. However due to different compiler settings, a lot of manual fixups are needed. This is the first attempt at some obvious fixes that can be done without any harm to the code and its readability. Please note that 10/10 in this series is marked as RFC since I have no idea what is correct here. From the structures point of view the assignment that is done makes no sense to me. I might have to dig into specification to figure it out or it better be commented accordingly to tell the compiler that it got this part wrong. Marcel Holtmann (10): libvhost-user: Provide _GNU_SOURCE when compiling outside of QEMU libvhost-user: Replace typeof with __typeof__ libvhost-user: Cast rc variable to avoid compiler warning libvhost-user: Use unsigned int i for some for-loop iterations libvhost-user: Declare uffdio_register early to make it C90 compliant libvhost-user: Change dev->postcopy_ufd assignment to make it C90 compliant libvhost-user: Switch to unsigned int for inuse field in struct VuVirtq libvduse: Provide _GNU_SOURCE when compiling outside of QEMU libvduse: Switch to unsigned int for inuse field in struct VduseVirtq libvduse: Fix assignment in vring_set_avail_event subprojects/libvduse/libvduse.c | 11 ++++++-- subprojects/libvhost-user/libvhost-user.c | 31 ++++++++++++++--------- subprojects/libvhost-user/libvhost-user.h | 2 +- 3 files changed, 29 insertions(+), 15 deletions(-) -- 2.38.1