From patchwork Wed Mar 1 20:59:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 65867 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D9332385828D for ; Wed, 1 Mar 2023 21:00:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D9332385828D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677704432; bh=4clc+KfUyt2hGjwIlD723lqx0odwGgVpZXxRFu6Qt10=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=szPQAhzlKmyT4k/0hZtIQAlM3K5VFTtNGeM1awUEdQYglP/Ea9gQIPXyan6Y8He15 z4ug7NdXz/WgzT/fWXExD2zgywTVes1e213wV76EixzVwmNEpFkdUzkZ7t/lZTZPRN j8zbXaSw26/jueMkWoLFmGhnP0eJ4PVR1T1incF4= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-il1-x132.google.com (mail-il1-x132.google.com [IPv6:2607:f8b0:4864:20::132]) by sourceware.org (Postfix) with ESMTPS id 8403C3858410 for ; Wed, 1 Mar 2023 20:59:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8403C3858410 Received: by mail-il1-x132.google.com with SMTP id r4so9174742ila.2 for ; Wed, 01 Mar 2023 12:59:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677704384; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4clc+KfUyt2hGjwIlD723lqx0odwGgVpZXxRFu6Qt10=; b=5baj+sLKfvC2fxP5h78QB+G7QTxxtbpfzbvApKQPAGAR3sUydnEUxytAJKx1JcSjUB JN2LtqMw1LuVMeqQjo5fMbz/oFajn4Vh3vO9CNdpV/+xN/yPwQCqeliYiT8uaOTY3ZCs kONR9Y+QMeGdQroMtVROABp+hYE0CuuDf0wJzbPfiuBGf6QrpEScssRMmC8tN6TA3EY/ 6Ch/0hbLj0e+iNMTdDQDfsiQxK3YW6RLPx+qy4ueNwUPY6SYjD4mC1lx9R6TMVIXnUbH +7oycLU1pr5k7/ucORN3mHQ03bVy0AfcUE0opHIRYssBjKDZcyd0uYBdd8+9RUtBi8HY LSQg== X-Gm-Message-State: AO0yUKWJW5JZNtQDqdJ0J4W8Y2b6ZBNqQbLuUe+W4n1Tn3g8CSPk2RdT Oa52fPbVBP/hUrOv8XQh0MfXe8Iq7SoBVD2J X-Google-Smtp-Source: AK7set+/7y7ou4onBwuvF7DrhiixKo60pLSqZvCA37OQYMjqWVmAKelkSYpD8Ro5e97ThAnsq89wYw== X-Received: by 2002:a05:6e02:20cd:b0:317:98d3:f9ea with SMTP id 13-20020a056e0220cd00b0031798d3f9eamr2223139ilq.24.1677704384690; Wed, 01 Mar 2023 12:59:44 -0800 (PST) Received: from localhost.localdomain (75-166-130-93.hlrn.qwest.net. [75.166.130.93]) by smtp.gmail.com with ESMTPSA id l7-20020a02a887000000b003c5178055fdsm4196208jam.62.2023.03.01.12.59.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Mar 2023 12:59:44 -0800 (PST) To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [pushed] Fix type of check_valid_shift_count parameter Date: Wed, 1 Mar 2023 13:59:34 -0700 Message-Id: <20230301205934.3295865-1-tromey@adacore.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tom Tromey via Gdb-patches From: Tom Tromey Reply-To: Tom Tromey Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" check_valid_shift_count has an 'int' parameter that really should be an enum exp_opcode. This patch makes the change. Tested by rebuilding. --- gdb/valarith.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/valarith.c b/gdb/valarith.c index 070ee63808e..6ea0cd9e8d1 100644 --- a/gdb/valarith.c +++ b/gdb/valarith.c @@ -1102,7 +1102,7 @@ type_length_bits (type *type) false, or errors out. Returns true if valid. */ static bool -check_valid_shift_count (int op, type *result_type, +check_valid_shift_count (enum exp_opcode op, type *result_type, type *shift_count_type, ULONGEST shift_count) { if (!shift_count_type->is_unsigned () && (LONGEST) shift_count < 0)