From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) by sourceware.org (Postfix) with ESMTPS id BC9A33858D1E for ; Wed, 17 Aug 2022 18:46:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BC9A33858D1E 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 Received: by mail-lj1-f180.google.com with SMTP id v4so1113745ljg.0 for ; Wed, 17 Aug 2022 11:46:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=WIj0dfCuW+ywm++DaedodL9+Fl75PGR7wM4Bso6Rtsg=; b=WkPpVg+8MTM1bLVu5cu7HhGGUF2D3yDWhesVuYB8a9zWJpHTZ12WRv7H2xVJI1GOpz UZPATI5NKJNvta20/lN9A6OTUWIw3hNNrSP815osVHczaGYCVyLuWT/wX/JTaTgYbG7u IYnEeEYbmg9Z5GgHeRj7HMZvHXFIgOkbT2/WfyyMj+8Cs0KfW5SG+Tl+5hJfzuodGwzT xNgbX3A12DDl/oO3ES2ZzSNoXPBF4Vah3evkzvWD/lqdhUFgNCql3yD0gXdbfRjjWkiN wScMadNIYtzMja28EpwMuUEAI4iC3123T5TzrGEtr2GEpwjxb6ORvnka5kI6cfa7IFb1 +t+g== X-Gm-Message-State: ACgBeo3EiRt1AZE3J5XK0+KydQBscVH7bXBoAEGjv0TfxdDmdrAVD8NO uEbOScyKU+YtqKto9vaqNUSlXQ== X-Google-Smtp-Source: AA6agR43rGozpX8dfqBTzNcbJPcZb1At8c+lYs67Lu45uhp9gyAHXb8k7y+n2UN+rJK1hRZunpdqzw== X-Received: by 2002:a2e:9c8a:0:b0:25e:c51d:182f with SMTP id x10-20020a2e9c8a000000b0025ec51d182fmr8318828lji.196.1660762018529; Wed, 17 Aug 2022 11:46:58 -0700 (PDT) Received: from ?IPV6:2a03:1ac0:b0d6:4d64:d05e:5079:8e96:480d? ([2a03:1ac0:b0d6:4d64:d05e:5079:8e96:480d]) by smtp.gmail.com with ESMTPSA id cf29-20020a056512281d00b00492967f41f6sm644301lfb.32.2022.08.17.11.46.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Aug 2022 11:46:58 -0700 (PDT) Message-ID: Date: Wed, 17 Aug 2022 21:46:56 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] Add an option with a color type. Content-Language: en-US To: Andrew Burgess , gdb-patches@sourceware.org References: <20220815211534.33740-1-gdb@mail.api.win> <87zgg2ydhx.fsf@redhat.com> From: Andrei Pikas In-Reply-To: <87zgg2ydhx.fsf@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, BODY_8BITS, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no 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-List-Received-Date: Wed, 17 Aug 2022 18:47:01 -0000 >>  /* A GDB parameter. >> @@ -193,7 +196,7 @@ pascm_make_param_smob (void) >>      scm_gc_malloc (sizeof (param_smob), param_smob_name); >>    SCM p_scm; >> >> -  memset (p_smob, 0, sizeof (*p_smob)); >> +  memset (reinterpret_cast (p_smob), 0, sizeof (*p_smob)); > > This seems a bit random for this patch.  If this is needed then this > should probably be in a separate patch, with its own justification. > I've changed this because the memset from gdbsupport/posion.h forbids the use of param_smob* because it's no longer std::is_pod after I've added color into union pascm_variable. I doubt it makes sense to move this reinterpret_cast to a separate patch without adding color. May I delete this memset at all and replace it with scm_gc_calloc above in this same patch?