xserver: Branch 'master' - 4 commits
Adam Jackson
ajax at kemper.freedesktop.org
Fri Oct 20 17:17:02 UTC 2017
hw/xfree86/fbdevhw/fbdevhw.c | 6 +++---
hw/xfree86/int10/meson.build | 6 ++++++
hw/xfree86/x86emu/sys.c | 12 ++++++------
hw/xfree86/x86emu/x86emu/types.h | 1 +
include/meson.build | 4 +++-
5 files changed, 19 insertions(+), 10 deletions(-)
New commits:
commit 6d7e1d1de06336c9b49a253810afda8ac4e9f7b2
Author: Lyude Paul <lyude at redhat.com>
Date: Fri Oct 13 15:44:32 2017 -0400
meson: Don't forget to define DEBUG!
Changes since v2:
- Don't enable by default for debugoptimized builds
Signed-off-by: Lyude Paul <lyude at redhat.com>
Reviewed-by: Adam Jackson <ajax at redhat.com>
diff --git a/include/meson.build b/include/meson.build
index 5d746eb70..ce933ca43 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -196,6 +196,9 @@ conf_data.set('XvMCExtension', build_xv)
conf_data.set('HAVE_SHA1_IN_LIBNETTLE', '1') # XXX
+enable_debugging = get_option('buildtype') == 'debug'
+conf_data.set('DEBUG', enable_debugging)
+
conf_data.set_quoted('XVENDORNAME', get_option('vendor_name'))
conf_data.set_quoted('XVENDORNAMESHORT', get_option('vendor_name_short'))
conf_data.set_quoted('__VENDORDWEBSUPPORT__', get_option('vendor_web'))
@@ -282,7 +285,6 @@ xwin_data.set('HAS_WINSOCK', host_machine.system() == 'windows', description: 'U
xwin_data.set('HAS_DEVWINDOWS', host_machine.system() == 'cygwin', description: 'Has /dev/windows for signaling new win32 messages')
xwin_data.set('RELOCATE_PROJECTROOT', host_machine.system() == 'windows', description: 'Make paths relative to the xserver installation location')
# XXX: these three are all the same as DEBUG so we should just change to that
-enable_debugging = (get_option('buildtype') == 'debug') or (get_option('buildtype') == 'debugoptimized')
xwin_data.set10('CYGDEBUG', enable_debugging)
xwin_data.set10('CYGWINDOWING_DEBUG',enable_debugging)
xwin_data.set10('CYGMULTIWINDOW_DEBUG', enable_debugging)
commit 0debe011901b87f686e2a76ce5edc150b04bf9d1
Author: Lyude Paul <lyude at redhat.com>
Date: Fri Oct 13 15:44:31 2017 -0400
meson: Silence -Wformat-nonliteral for x86emu
Signed-off-by: Lyude Paul <lyude at redhat.com>
Reviewed-by: Adam Jackson <ajax at redhat.com>
diff --git a/hw/xfree86/int10/meson.build b/hw/xfree86/int10/meson.build
index 3bcf99ab4..b1ead9c4c 100644
--- a/hw/xfree86/int10/meson.build
+++ b/hw/xfree86/int10/meson.build
@@ -25,6 +25,12 @@ if int10 == 'x86emu'
]
int10_c_args += '-D_X86EMU'
int10_c_args += '-DNO_SYS_HEADERS'
+
+ # Silence some useless warnings from x86emu
+ if cc.has_argument('-Wno-format-nonliteral')
+ int10_c_args += '-Wno-format-nonliteral'
+ endif
+
int10_link += xorg_x86emu
endif
commit cbca18c5516084ee540255df52e116209f1c1cbe
Author: Lyude Paul <lyude at redhat.com>
Date: Fri Oct 13 15:44:30 2017 -0400
x86emu: Fix type conversion warnings on x86_64 with DEBUG
Warnings come from the fact that PRIx32 is not used for printing 32 bit
values instead of "%lx", and "%lx" evaluates to a 64 bit long on 64 bit
systems while PRIx32 always evaluates to the right type for the
respective arch.
Signed-off-by: Lyude Paul <lyude at redhat.com>
Reviewed-by: Adam Jackson <ajax at redhat.com>
diff --git a/hw/xfree86/x86emu/sys.c b/hw/xfree86/x86emu/sys.c
index 5eba35856..ccce540e7 100644
--- a/hw/xfree86/x86emu/sys.c
+++ b/hw/xfree86/x86emu/sys.c
@@ -191,7 +191,7 @@ rdb(u32 addr)
u8 val;
if (addr > M.mem_size - 1) {
- DB(printk("mem_read: address %#lx out of range!\n", addr);
+ DB(printk("mem_read: address %#" PRIx32 " out of range!\n", addr);
)
HALT_SYS();
}
@@ -217,7 +217,7 @@ rdw(u32 addr)
u16 val = 0;
if (addr > M.mem_size - 2) {
- DB(printk("mem_read: address %#lx out of range!\n", addr);
+ DB(printk("mem_read: address %#" PRIx32 " out of range!\n", addr);
)
HALT_SYS();
}
@@ -249,7 +249,7 @@ rdl(u32 addr)
u32 val = 0;
if (addr > M.mem_size - 4) {
- DB(printk("mem_read: address %#lx out of range!\n", addr);
+ DB(printk("mem_read: address %#" PRIx32 " out of range!\n", addr);
)
HALT_SYS();
}
@@ -282,7 +282,7 @@ wrb(u32 addr, u8 val)
DB(if (DEBUG_MEM_TRACE())
printk("%#08x 1 <- %#x\n", addr, val);)
if (addr > M.mem_size - 1) {
- DB(printk("mem_write: address %#lx out of range!\n", addr);
+ DB(printk("mem_write: address %#" PRIx32 " out of range!\n",addr);
)
HALT_SYS();
}
@@ -303,7 +303,7 @@ wrw(u32 addr, u16 val)
DB(if (DEBUG_MEM_TRACE())
printk("%#08x 2 <- %#x\n", addr, val);)
if (addr > M.mem_size - 2) {
- DB(printk("mem_write: address %#lx out of range!\n", addr);
+ DB(printk("mem_write: address %#" PRIx32 " out of range!\n",addr);
)
HALT_SYS();
}
@@ -331,7 +331,7 @@ wrl(u32 addr, u32 val)
DB(if (DEBUG_MEM_TRACE())
printk("%#08x 4 <- %#x\n", addr, val);)
if (addr > M.mem_size - 4) {
- DB(printk("mem_write: address %#lx out of range!\n", addr);
+ DB(printk("mem_write: address %#" PRIx32 " out of range!\n",addr);
)
HALT_SYS();
}
diff --git a/hw/xfree86/x86emu/x86emu/types.h b/hw/xfree86/x86emu/x86emu/types.h
index 5a6ef01f8..0559bc089 100644
--- a/hw/xfree86/x86emu/x86emu/types.h
+++ b/hw/xfree86/x86emu/x86emu/types.h
@@ -61,6 +61,7 @@
/*---------------------- Macros and type definitions ----------------------*/
#include <stdint.h>
+#include <inttypes.h>
typedef uint8_t u8;
typedef uint16_t u16;
commit 01470ce0a9628abc8af4fe7b960f0d1eced8cd46
Author: Lyude Paul <lyude at redhat.com>
Date: Fri Oct 13 15:44:29 2017 -0400
fbdevhw: Fix inconsistent #if DEBUG usage
fbdevhw is the only file in X's source that actually uses #if DEBUG to
check for debugging instead of #ifdef DEBUG. This is contrary to
everything else that checks the DEBUG macro in the source, so let's make
it consistent and in turn, make our meson files a little simpler.
Signed-off-by: Lyude Paul <lyude at redhat.com>
Reviewed-by: Adam Jackson <ajax at redhat.com>
diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c
index b50ae5ed2..0bd77df87 100644
--- a/hw/xfree86/fbdevhw/fbdevhw.c
+++ b/hw/xfree86/fbdevhw/fbdevhw.c
@@ -120,7 +120,7 @@ fbdevHWGetFD(ScrnInfoPtr pScrn)
/* -------------------------------------------------------------------- */
/* some helpers for printing debug informations */
-#if DEBUG
+#ifdef DEBUG
static void
print_fbdev_mode(const char *txt, struct fb_var_screeninfo *var)
{
@@ -466,7 +466,7 @@ fbdevHWSetMode(ScrnInfoPtr pScrn, DisplayModePtr mode, Bool check)
xfree2fbdev_fblayout(pScrn, &req_var);
xfree2fbdev_timing(mode, &req_var);
-#if DEBUG
+#ifdef DEBUG
print_xfree_mode("init", mode);
print_fbdev_mode("init", &req_var);
#endif
@@ -486,7 +486,7 @@ fbdevHWSetMode(ScrnInfoPtr pScrn, DisplayModePtr mode, Bool check)
if (!check)
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"FBIOPUT_VSCREENINFO succeeded but modified " "mode\n");
-#if DEBUG
+#ifdef DEBUG
print_fbdev_mode("returned", &set_var);
#endif
return FALSE;
More information about the xorg-commit
mailing list