blob: 5fa36709e38c331e7ebe6891d1df3a6317249f97 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
id = 2210
title = "contrib/plugins/execlog.c: warning: passing argument 2 of ‘g_ptr_array_add’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]"
state = "closed"
created_at = "2024-03-06T09:25:23.290Z"
closed_at = "2024-03-26T19:46:03.188Z"
labels = ["TCG plugins", "kind::Bug"]
url = "https://gitlab.com/qemu-project/qemu/-/issues/2210"
host-os = "n/a"
host-arch = "n/a"
qemu-version = "n/a"
guest-os = "n/a"
guest-arch = "n/a"
description = """Hit some warning messages when compiling upstream qemu"""
reproduce = """1. Clone repo and compile it
1.1 git clone https://gitlab.com/qemu-project/qemu.git
1.2 mkdir build
1.3 cd build/
1.4 ../configure --target-list=x86_64-softmmu --enable-debug-info
1.5 make
2. It will print the following warning messages:
```
[2767/2767] Linking target tests/qtest/netdev-socket
/root/qemu/contrib/plugins/execlog.c: In function ‘registers_init’:
/root/qemu/contrib/plugins/execlog.c:339:63: warning: passing argument 2 of ‘g_ptr_array_add’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
339 | g_ptr_array_add(all_reg_names, reg->name);
| ~~~^~~~~~
In file included from /usr/include/glib-2.0/glib.h:31,
from /root/qemu/contrib/plugins/execlog.c:9:
/usr/include/glib-2.0/glib/garray.h:192:62: note: expected ‘gpointer’ {aka ‘void *’} but argument is of type ‘const char *’
192 | gpointer data);
| ~~~~~~~~~~~~~~~~~~^~~~
```"""
additional = """1. After Eugenio Perez Martin (eperezma@redhat.com) debug, we found this problem introduced by this commit:
```
commit af6e4e0a22c18a7cc97650caec56ed99c9899dd7
Author: Alex Bennée <alex.bennee@linaro.org>
Date: Tue Feb 27 14:43:32 2024 +0000
contrib/plugins: extend execlog to track register changes
```
2. The latest commit in my env:
```
commit db596ae19040574e41d086e78469014191d7d7fc (origin/staging, origin/master, origin/HEAD)
Merge: 7d4e29ef80 7558300c53
Author: Peter Maydell <peter.maydell@linaro.org>
Date: Tue Mar 5 13:54:54 2024 +0000
Merge tag 'pull-target-arm-20240305' of https://git.linaro.org/people/pmaydell/qemu-arm into staging
target-arm queue:
* raspi: Implement Broadcom Serial Controller (BSC) for BCM2835 boards
* hw/char/pl011: Add support for loopback
* STM32L4x5: Implement RCC clock control device
* target/arm: Do memory type alignment checks
* atomic.h: Reword confusing comment for qatomic_cmpxchg
* qemu-options.hx: Don't claim "-serial" has limit of 4 serial ports
```"""
|