QEMU-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: "Chenqun (kuhn)" <kuhn.chenqun@huawei.com>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: Zhanghailiang <zhang.zhanghailiang@huawei.com>,
	"qemu-trivial@nongnu.org" <qemu-trivial@nongnu.org>,
	"laurent@vivier.eu" <laurent@vivier.eu>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"Euler Robot" <euler.robot@huawei.com>,
	"mrezanin@redhat.com" <mrezanin@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: RE: [PATCH 1/3] gdbstub: prevent uninitialized warning
Date: Fri, 27 Mar 2020 09:43:29 +0000
Message-ID: <7412CDE03601674DA8197E2EBD8937E83B6C9255@dggemm511-mbx.china.huawei.com> (raw)
In-Reply-To: <874kuanou9.fsf@linaro.org>

>-----Original Message-----
>From: Alex Bennée [mailto:alex.bennee@linaro.org]
>Sent: Friday, March 27, 2020 5:13 PM
>To: Chenqun (kuhn) <kuhn.chenqun@huawei.com>
>Cc: qemu-devel@nongnu.org; qemu-trivial@nongnu.org; Zhanghailiang
><zhang.zhanghailiang@huawei.com>; laurent@vivier.eu; Euler Robot
><euler.robot@huawei.com>; Philippe Mathieu-Daudé <philmd@redhat.com>
>Subject: Re: [PATCH 1/3] gdbstub: prevent uninitialized warning
>
>
>Chen Qun <kuhn.chenqun@huawei.com> writes:
>
>> According to the glib function requirements, we need initialise
>>      the variable. Otherwise there will be compilation warnings:
>>
>> qemu/gdbstub.c: In function ‘handle_query_thread_extra’:
>> /usr/include/glib-2.0/glib/glib-autocleanups.h:28:3: warning:
>>  ‘cpu_name’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>>    g_free (*pp);
>>    ^~~~~~~~~~~~
>>
>> Reported-by: Euler Robot <euler.robot@huawei.com>
>> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
>
>Thanks,
>
>I've pulled in a duplicate fix from:
>
>  Message-Id: <20200326151407.25046-1-dplotnikov@virtuozzo.com>
>
>and added your Reported-by's

OK,  If possible, bring Miroslav Rezanina's  "Reviewed-by" tag.

https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg07651.html

Thanks.
>
>> ---
>> Cc: "Alex Bennée" <alex.bennee@linaro.org>
>> Cc: "Philippe Mathieu-Daudé" <philmd@redhat.com>
>> ---
>>  gdbstub.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/gdbstub.c b/gdbstub.c
>> index 013fb1ac0f..171e150950 100644
>> --- a/gdbstub.c
>> +++ b/gdbstub.c
>> @@ -2060,8 +2060,8 @@ static void
>handle_query_thread_extra(GdbCmdContext *gdb_ctx, void *user_ctx)
>>          /* Print the CPU model and name in multiprocess mode */
>>          ObjectClass *oc = object_get_class(OBJECT(cpu));
>>          const char *cpu_model = object_class_get_name(oc);
>> -        g_autofree char *cpu_name;
>> -        cpu_name  = object_get_canonical_path_component(OBJECT(cpu));
>> +        g_autofree char *cpu_name =
>> +            object_get_canonical_path_component(OBJECT(cpu));
>>          g_string_printf(rs, "%s %s [%s]", cpu_model, cpu_name,
>>                          cpu->halted ? "halted " : "running");
>>      } else {
>
>
>--
>Alex Bennée

  reply index

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-25  9:21 [PATCH 0/3] Three trivial patchs Chen Qun
2020-03-25  9:21 ` [PATCH 1/3] gdbstub: prevent uninitialized warning Chen Qun
2020-03-25 12:56   ` Miroslav Rezanina
2020-03-27  9:12   ` Alex Bennée
2020-03-27  9:43     ` Chenqun (kuhn) [this message]
2020-03-25  9:21 ` [PATCH 2/3] virtio-crypto: fix 80-char limit violations in virtio_crypto_device_realize() Chen Qun
2020-03-25  9:21 ` [PATCH 3/3] crypto: Redundant type conversion for AES_KEY pointer Chen Qun
2020-03-25  9:45   ` Laurent Vivier
2020-03-25 10:06     ` Chenqun (kuhn)
2020-03-25 10:14       ` Laurent Vivier
2020-03-25  9:45   ` Daniel P. Berrangé
2020-04-03  8:47   ` Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7412CDE03601674DA8197E2EBD8937E83B6C9255@dggemm511-mbx.china.huawei.com \
    --to=kuhn.chenqun@huawei.com \
    --cc=alex.bennee@linaro.org \
    --cc=euler.robot@huawei.com \
    --cc=laurent@vivier.eu \
    --cc=mrezanin@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=zhang.zhanghailiang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

QEMU-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/qemu-devel/0 qemu-devel/git/0.git
	git clone --mirror https://lore.kernel.org/qemu-devel/1 qemu-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 qemu-devel qemu-devel/ https://lore.kernel.org/qemu-devel \
		qemu-devel@nongnu.org
	public-inbox-index qemu-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.nongnu.qemu-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git