Commit d78f399542b0b81fab67f31c9a88665943f0571d

Authored by blueswir1
1 parent 7f70c937

Delete some unused macros detected with -Wp,-Wunused-macros use

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6856 c046a42c-6fe2-441c-8c8c-71466251a162
... ... @@ -40,10 +40,6 @@ typedef uint32_t u32;
40 40 typedef uint16_t u16;
41 41 typedef uint8_t u8;
42 42  
43   -#define MAXKC (256/32)
44   -#define MAXKB (256/8)
45   -#define MAXNR 14
46   -
47 43 /* This controls loop-unrolling in aes_core.c */
48 44 #undef FULL_UNROLL
49 45 # define GETU32(pt) (((u32)(pt)[0] << 24) ^ ((u32)(pt)[1] << 16) ^ ((u32)(pt)[2] << 8) ^ ((u32)(pt)[3]))
... ...
console.c
... ... @@ -28,7 +28,6 @@
28 28 //#define DEBUG_CONSOLE
29 29 #define DEFAULT_BACKSCROLL 512
30 30 #define MAX_CONSOLES 12
31   -#define DEFAULT_MONITOR_SIZE "800x600"
32 31  
33 32 #define QEMU_RGBA(r, g, b, a) (((a) << 24) | ((r) << 16) | ((g) << 8) | (b))
34 33 #define QEMU_RGB(r, g, b) QEMU_RGBA(r, g, b, 0xff)
... ...
cpu-exec.c
... ... @@ -18,7 +18,6 @@
18 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA
19 19 */
20 20 #include "config.h"
21   -#define CPU_NO_GLOBAL_REGS
22 21 #include "exec.h"
23 22 #include "disas.h"
24 23 #include "tcg.h"
... ...
... ... @@ -63,9 +63,6 @@
63 63  
64 64 #define SMC_BITMAP_USE_THRESHOLD 10
65 65  
66   -#define MMAP_AREA_START 0x00000000
67   -#define MMAP_AREA_END 0xa8000000
68   -
69 66 #if defined(TARGET_SPARC64)
70 67 #define TARGET_PHYS_ADDR_SPACE_BITS 41
71 68 #elif defined(TARGET_SPARC)
... ...
hw/cirrus_vga.c
... ... @@ -49,8 +49,6 @@
49 49 *
50 50 ***************************************/
51 51  
52   -#define qemu_MIN(a,b) ((a) < (b) ? (a) : (b))
53   -
54 52 // ID
55 53 #define CIRRUS_ID_CLGD5422 (0x23<<2)
56 54 #define CIRRUS_ID_CLGD5426 (0x24<<2)
... ... @@ -173,10 +171,6 @@
173 171 #define CIRRUS_MMIO_LINEDRAW_MODE 0x39 // byte
174 172 #define CIRRUS_MMIO_BLTSTATUS 0x40 // byte
175 173  
176   -// PCI 0x02: device
177   -#define PCI_DEVICE_CLGD5462 0x00d0
178   -#define PCI_DEVICE_CLGD5465 0x00d6
179   -
180 174 // PCI 0x04: command(word), 0x06(word): status
181 175 #define PCI_COMMAND_IOACCESS 0x0001
182 176 #define PCI_COMMAND_MEMACCESS 0x0002
... ...
hw/dma.c
... ... @@ -28,11 +28,9 @@
28 28  
29 29 #define dolog(...) fprintf (stderr, "dma: " __VA_ARGS__)
30 30 #ifdef DEBUG_DMA
31   -#define lwarn(...) fprintf (stderr, "dma: " __VA_ARGS__)
32 31 #define linfo(...) fprintf (stderr, "dma: " __VA_ARGS__)
33 32 #define ldebug(...) fprintf (stderr, "dma: " __VA_ARGS__)
34 33 #else
35   -#define lwarn(...)
36 34 #define linfo(...)
37 35 #define ldebug(...)
38 36 #endif
... ...
hw/eepro100.c
... ... @@ -47,22 +47,11 @@
47 47  
48 48 /* Common declarations for all PCI devices. */
49 49  
50   -#define PCI_VENDOR_ID 0x00 /* 16 bits */
51 50 #define PCI_DEVICE_ID 0x02 /* 16 bits */
52 51 #define PCI_COMMAND 0x04 /* 16 bits */
53 52 #define PCI_STATUS 0x06 /* 16 bits */
54 53  
55 54 #define PCI_REVISION_ID 0x08 /* 8 bits */
56   -#define PCI_CLASS_CODE 0x0b /* 8 bits */
57   -#define PCI_SUBCLASS_CODE 0x0a /* 8 bits */
58   -#define PCI_HEADER_TYPE 0x0e /* 8 bits */
59   -
60   -#define PCI_BASE_ADDRESS_0 0x10 /* 32 bits */
61   -#define PCI_BASE_ADDRESS_1 0x14 /* 32 bits */
62   -#define PCI_BASE_ADDRESS_2 0x18 /* 32 bits */
63   -#define PCI_BASE_ADDRESS_3 0x1c /* 32 bits */
64   -#define PCI_BASE_ADDRESS_4 0x20 /* 32 bits */
65   -#define PCI_BASE_ADDRESS_5 0x24 /* 32 bits */
66 55  
67 56 #define PCI_CONFIG_8(offset, value) \
68 57 (pci_conf[offset] = (value))
... ... @@ -199,12 +188,6 @@ typedef enum {
199 188 ru_ready = 4
200 189 } ru_state_t;
201 190  
202   -#if defined(__BIG_ENDIAN_BITFIELD)
203   -#define X(a,b) b,a
204   -#else
205   -#define X(a,b) a,b
206   -#endif
207   -
208 191 typedef struct {
209 192 #if 1
210 193 uint8_t cmd;
... ... @@ -1465,8 +1448,6 @@ static int nic_can_receive(void *opaque)
1465 1448 //~ return !eepro100_buffer_full(s);
1466 1449 }
1467 1450  
1468   -#define MIN_BUF_SIZE 60
1469   -
1470 1451 static void nic_receive(void *opaque, const uint8_t * buf, int size)
1471 1452 {
1472 1453 /* TODO:
... ...
hw/openpic.c
... ... @@ -44,7 +44,6 @@
44 44 #else
45 45 #define DPRINTF(fmt, args...) do { } while (0)
46 46 #endif
47   -#define ERROR(fmr, args...) do { printf("ERROR: " fmr , ##args); } while (0)
48 47  
49 48 #define USE_MPCxxx /* Intel model is broken, for now */
50 49  
... ...
hw/pckbd.c
... ... @@ -109,8 +109,6 @@
109 109 #define MOUSE_STATUS_ENABLED 0x20
110 110 #define MOUSE_STATUS_SCALE21 0x10
111 111  
112   -#define KBD_QUEUE_SIZE 256
113   -
114 112 #define KBD_PENDING_KBD 1
115 113 #define KBD_PENDING_AUX 2
116 114  
... ...
hw/piix_pci.c
... ... @@ -210,9 +210,6 @@ PCIBus *i440fx_init(PCIDevice **pi440fx_state, qemu_irq *pic)
210 210 static PCIDevice *piix3_dev;
211 211 PCIDevice *piix4_dev;
212 212  
213   -/* just used for simpler irq handling. */
214   -#define PCI_IRQ_WORDS ((PCI_DEVICES_MAX + 31) / 32)
215   -
216 213 static void piix3_set_irq(qemu_irq *pic, int irq_num, int level)
217 214 {
218 215 int i, pic_irq, pic_level;
... ...
... ... @@ -242,8 +242,6 @@ static void sd_set_cid(SDState *sd)
242 242 #define SECTOR_SHIFT 5 /* 16 kilobytes */
243 243 #define WPGROUP_SHIFT 7 /* 2 megs */
244 244 #define CMULT_SHIFT 9 /* 512 times HWBLOCK_SIZE */
245   -#define BLOCK_SIZE (1 << (HWBLOCK_SHIFT))
246   -#define SECTOR_SIZE (1 << (HWBLOCK_SHIFT + SECTOR_SHIFT))
247 245 #define WPGROUP_SIZE (1 << (HWBLOCK_SHIFT + SECTOR_SHIFT + WPGROUP_SHIFT))
248 246  
249 247 static const uint8_t sd_csd_rw_mask[16] = {
... ...
hw/slavio_intctl.c
... ... @@ -77,7 +77,6 @@ typedef struct SLAVIO_CPUINTCTLState {
77 77 #define MASTER_IRQ_MASK ~0x0fa2007f
78 78 #define MASTER_DISABLE 0x80000000
79 79 #define CPU_SOFTIRQ_MASK 0xfffe0000
80   -#define CPU_HARDIRQ_MASK 0x0000fffe
81 80 #define CPU_IRQ_INT15_IN 0x0004000
82 81 #define CPU_IRQ_INT15_MASK 0x80000000
83 82  
... ...
hw/slavio_misc.c
... ... @@ -56,10 +56,7 @@ typedef struct MiscState {
56 56  
57 57 #define MISC_SIZE 1
58 58 #define SYSCTRL_SIZE 4
59   -#define LED_MAXADDR 1
60   -#define LED_SIZE (LED_MAXADDR + 1)
61 59  
62   -#define MISC_MASK 0x0fff0000
63 60 #define MISC_LEDS 0x01600000
64 61 #define MISC_CFG 0x01800000
65 62 #define MISC_DIAG 0x01a00000
... ...
loader.c
... ... @@ -199,7 +199,6 @@ static void bswap_ahdr(struct exec *e)
199 199 (N_MAGIC(x) == ZMAGIC ? _N_HDROFF((x)) + sizeof (struct exec) : \
200 200 (N_MAGIC(x) == QMAGIC ? 0 : sizeof (struct exec)))
201 201 #define N_TXTADDR(x) (N_MAGIC(x) == QMAGIC ? TARGET_PAGE_SIZE : 0)
202   -#define N_DATOFF(x) (N_TXTOFF(x) + (x).a_text)
203 202 #define _N_SEGMENT_ROUND(x) (((x) + TARGET_PAGE_SIZE - 1) & ~(TARGET_PAGE_SIZE - 1))
204 203  
205 204 #define _N_TXTENDADDR(x) (N_TXTADDR(x)+(x).a_text)
... ...
slirp/misc.c
... ... @@ -5,7 +5,6 @@
5 5 * terms and conditions of the copyright.
6 6 */
7 7  
8   -#define WANT_SYS_IOCTL_H
9 8 #include <slirp.h>
10 9  
11 10 u_int curtime, time_fasttimo, last_slowtimo;
... ...
slirp/socket.c
... ... @@ -6,7 +6,6 @@
6 6 */
7 7  
8 8 #include "qemu-common.h"
9   -#define WANT_SYS_IOCTL_H
10 9 #include <slirp.h>
11 10 #include "ip_icmp.h"
12 11 #ifdef __sun__
... ...
slirp/tcp_subr.c
... ... @@ -38,7 +38,6 @@
38 38 * terms and conditions of the copyright.
39 39 */
40 40  
41   -#define WANT_SYS_IOCTL_H
42 41 #include <slirp.h>
43 42  
44 43 /* patchable/settable parameters for tcp */
... ...
target-sparc/helper.c
... ... @@ -1366,8 +1366,6 @@ void sparc_cpu_list(FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...))
1366 1366 "fpu_version mmu_version nwindows\n");
1367 1367 }
1368 1368  
1369   -#define GET_FLAG(a,b) ((env->psr & a)?b:'-')
1370   -
1371 1369 void cpu_dump_state(CPUState *env, FILE *f,
1372 1370 int (*cpu_fprintf)(FILE *f, const char *fmt, ...),
1373 1371 int flags)
... ... @@ -1411,6 +1409,9 @@ void cpu_dump_state(CPUState *env, FILE *f,
1411 1409 env->cansave, env->canrestore, env->otherwin, env->wstate,
1412 1410 env->cleanwin, env->nwindows - 1 - env->cwp);
1413 1411 #else
  1412 +
  1413 +#define GET_FLAG(a,b) ((env->psr & a)?b:'-')
  1414 +
1414 1415 cpu_fprintf(f, "psr: 0x%08x -> %c%c%c%c %c%c%c wim: 0x%08x\n",
1415 1416 GET_PSR(env), GET_FLAG(PSR_ZERO, 'Z'), GET_FLAG(PSR_OVF, 'V'),
1416 1417 GET_FLAG(PSR_NEG, 'N'), GET_FLAG(PSR_CARRY, 'C'),
... ...
target-sparc/op_helper.c
... ... @@ -29,8 +29,6 @@ do { printf(&quot;MXCC: &quot; fmt , ##args); } while (0)
29 29 #ifdef DEBUG_ASI
30 30 #define DPRINTF_ASI(fmt, args...) \
31 31 do { printf("ASI: " fmt , ##args); } while (0)
32   -#else
33   -#define DPRINTF_ASI(fmt, args...) do {} while (0)
34 32 #endif
35 33  
36 34 #ifdef TARGET_SPARC64
... ...
target-sparc/translate.c
... ... @@ -92,11 +92,9 @@ typedef struct DisasContext {
92 92 #define GET_FIELD_SPs(x,a,b) sign_extend (GET_FIELD_SP(x,a,b), ((b) - (a) + 1))
93 93  
94 94 #ifdef TARGET_SPARC64
95   -#define FFPREG(r) (r)
96 95 #define DFPREG(r) (((r & 1) << 5) | (r & 0x1e))
97 96 #define QFPREG(r) (((r & 1) << 5) | (r & 0x1c))
98 97 #else
99   -#define FFPREG(r) (r)
100 98 #define DFPREG(r) (r & 0x1e)
101 99 #define QFPREG(r) (r & 0x1c)
102 100 #endif
... ... @@ -2846,24 +2844,6 @@ static void disas_sparc_insn(DisasContext * dc)
2846 2844 #undef FMOVSCC
2847 2845 #undef FMOVDCC
2848 2846 #undef FMOVQCC
2849   -#define FMOVCC(size_FDQ, icc) \
2850   - { \
2851   - TCGv r_cond; \
2852   - int l1; \
2853   - \
2854   - l1 = gen_new_label(); \
2855   - r_cond = tcg_temp_new(); \
2856   - cond = GET_FIELD_SP(insn, 14, 17); \
2857   - gen_cond(r_cond, icc, cond); \
2858   - tcg_gen_brcondi_tl(TCG_COND_EQ, r_cond, \
2859   - 0, l1); \
2860   - glue(glue(gen_op_load_fpr_, size_FDQ), T0) \
2861   - (glue(size_FDQ, FPREG(rs2))); \
2862   - glue(glue(gen_op_store_, size_FDQ), T0_fpr) \
2863   - (glue(size_FDQ, FPREG(rd))); \
2864   - gen_set_label(l1); \
2865   - tcg_temp_free(r_cond); \
2866   - }
2867 2847 #define FMOVSCC(icc) \
2868 2848 { \
2869 2849 TCGv r_cond; \
... ...
... ... @@ -2914,8 +2914,6 @@ static void dumb_display_init(void)
2914 2914 /***********************************************************/
2915 2915 /* I/O handling */
2916 2916  
2917   -#define MAX_IO_HANDLERS 64
2918   -
2919 2917 typedef struct IOHandlerRecord {
2920 2918 int fd;
2921 2919 IOCanRWHandler *fd_read_poll;
... ...
... ... @@ -149,8 +149,6 @@ static const char *vnc_auth_name(VncDisplay *vd) {
149 149 return "unknown";
150 150 }
151 151  
152   -#define VNC_SOCKET_FORMAT_PRETTY "local %s:%s"
153   -
154 152 static void do_info_vnc_client(Monitor *mon, VncState *client)
155 153 {
156 154 char *clientAddr =
... ...