From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id bsQ/JdHQ5WZVCCsAWB0awg (envelope-from ) for ; Sat, 14 Sep 2024 14:07:13 -0400 Received: by simark.ca (Postfix, from userid 112) id 81C551E353; Sat, 14 Sep 2024 14:07:13 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-11.7 required=5.0 tests=ARC_SIGNED,ARC_VALID, BAYES_00,HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE autolearn=ham autolearn_force=no version=4.0.0 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 35F4F1E08F for ; Sat, 14 Sep 2024 14:07:12 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9C1A2385B508 for ; Sat, 14 Sep 2024 18:07:11 +0000 (GMT) Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) by sourceware.org (Postfix) with ESMTPS id 2BAD23858CDB for ; Sat, 14 Sep 2024 18:06:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2BAD23858CDB Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=mail.api.win Authentication-Results: sourceware.org; spf=none smtp.mailfrom=api.win ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2BAD23858CDB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.167.48 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1726337212; cv=none; b=q/lnNAKbSCHIP8tQDmYrlwVtpJLz3iGMDfhzsFDrXO0l0CSvJ/emJ3onucjGtZSfjAi06fAFufJSWxUknHUmhWm7dOjvh8hRKSe2TMcQCdEexiE3kNwoWu8MrO7HvIBiDKOB/NPcElgEj6FLyMKHt/BBuZ1ppxh+1PiAviB7BLo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1726337212; c=relaxed/simple; bh=h5SU5+gpXGh/PP2NPpbzXArJ0AMmwPeHCO67VQ4sO1o=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=jb8+PA9OnMnQ2cSNoRoyIQ9yroxn+niQrxb5HCuwLJ96cJbwk0QIC2fPzLqCbbUiHXUTWwi55JHeZlUKM9uOFktzHX9KWC2AMRk1y1ChlUSTlQlG8S1BhGvZyRgfbH2cI2C0mD+lS/0pU2bsCtIWs3xH99oolM8tbUgsXXbRg/Q= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-5365cc68efaso3310025e87.1 for ; Sat, 14 Sep 2024 11:06:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726337210; x=1726942010; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Xm1hQBsgm7Gpd/pQYlkD/IFpB3FFeV4K0xFWQUEihqw=; b=Hkrj0ajj6hxPwMXORItPK8XaH0CA0Erwk5mqzP6BLMmTqqwZmMkJDXoL+Pol6rxcJU 39ubCxCggad6CMXxTL/N4MBRlQdB/WUH3nFeuNYGewBG5LX3khSqERUvCvu09GeM4y4C Q3eqQjR1Tuu2eAaxrYYqnFsh6SLgXuBo+nZO3zPnYOEe9Zznpen3f3+9KoSlO/mrw+Eg ryR6BaUuaINcjQ+QeXPMam9xmqKgz0/Xtr1ag74ttML2XfJVgiiL4EWcgvFYqDJx4jhu uoNqeV+P0EBIDHzrNaD3U2NWeGPV/fCXWw7XHxmsMWQ/8gkSB0hJDv/XKJIQghcXZumm oVbA== X-Gm-Message-State: AOJu0Yy5Ab4MKdFlJYLZteHUu/eqC7ZkRcGJIuJHxbC2ITZW20vYc9MD yAUCQ7BouFHtDKrnjaeTa2N40QNkusz0FE+9m/XNh6dd4qi6oz7eX42reoKbUTY= X-Google-Smtp-Source: AGHT+IGC7eaQ56xQvQjSiuvW7XxTrQF2c+tujLmHJ+Gr9v4YaIuIjYRELzTIq3bdINz60L0+eoe4Tg== X-Received: by 2002:a05:6512:ba8:b0:52f:d15f:d46b with SMTP id 2adb3069b0e04-53678fb6de0mr6268673e87.14.1726337209275; Sat, 14 Sep 2024 11:06:49 -0700 (PDT) Received: from ?IPV6:2a03:1ac0:b0d6:4d64:b0a9:da40:2012:8237? ([2a03:1ac0:b0d6:4d64:b0a9:da40:2012:8237]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5368704c2b7sm327323e87.78.2024.09.14.11.06.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 14 Sep 2024 11:06:48 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------EKfKK4FbsrUu00C5R3AUUbxz" Message-ID: <5d391785-0f2e-4814-8960-e7f027d3e131@mail.api.win> Date: Sat, 14 Sep 2024 21:06:47 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6] Add an option with a color type. To: Tom Tromey Cc: gdb-patches@sourceware.org References: <83edv74u1v.fsf@gnu.org> <20221016162809.32801-1-gdb@mail.api.win> <87mskb1f83.fsf@tromey.com> Content-Language: en-US From: Andrei Pikas In-Reply-To: <87mskb1f83.fsf@tromey.com> X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org This is a multi-part message in MIME format. --------------EKfKK4FbsrUu00C5R3AUUbxz Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hello. Thanks for the review. >> + int colors = tgetnum ((char *)"Co"); > I wonder if that cast is really needed any longer. On my machine with Ubuntu 22.04 and libncurses-dev 6.3 there is no need to cast because of const char * in the signature of tgetnum. But in many manuals on the Internet the signature is described as tgetnum(char *). Since I can't test it on every supported OS with every curses implementation I would leave this cast as everywhere in the gdb sources. --------------EKfKK4FbsrUu00C5R3AUUbxz Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Hello. Thanks for the review.

+      int colors = tgetnum ((char *)"Co");
I wonder if that cast is really needed any longer.

On my machine with Ubuntu 22.04 and libncurses-dev 6.3 there is no need to cast because of const char * in the signature of tgetnum.

But in many manuals on the Internet the signature is described as tgetnum(char *).

Since I can't test it on every supported OS with every curses implementation I would leave this cast as everywhere in the gdb sources.

--------------EKfKK4FbsrUu00C5R3AUUbxz--