From 8f9e2c379c6e53860d8a8d717d1889e719180e0d Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Wed, 21 May 2008 08:50:59 +0000 Subject: [PATCH] Silence a few warnings. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3156 --- src/debug/debug.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/debug/debug.cpp b/src/debug/debug.cpp index de403a7e..b512b842 100644 --- a/src/debug/debug.cpp +++ b/src/debug/debug.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: debug.cpp,v 1.92 2008-01-21 21:20:01 qbix79 Exp $ */ +/* $Id: debug.cpp,v 1.93 2008-05-21 08:50:59 qbix79 Exp $ */ #include "dosbox.h" #if C_DEBUG @@ -173,6 +173,7 @@ Bit32u GetAddress(Bit16u seg, Bit32u offset) return (seg<<4)+offset; } +static char empty_sel[] = { ' ',' ',0 }; bool GetDescriptorInfo(char* selname, char* out1, char* out2) { @@ -187,7 +188,7 @@ bool GetDescriptorInfo(char* selname, char* out1, char* out2) else if (strstr(selname,"ss") || strstr(selname,"SS")) sel = SegValue(ss); else { sel = GetHexValue(selname,selname); - if (*selname==0) selname=" "; + if (*selname==0) selname=empty_sel; } if (cpu.gdt.GetDescriptor(sel,desc)) { switch (desc.Type()) { @@ -808,7 +809,8 @@ static void DrawCode(void) { line20[20 - drawsize*2] = ' '; } else waddstr(dbg.win_code,line20); - char* res = ""; + char empty_res[] = { 0 }; + char* res = empty_res; if (showExtend) res = AnalyzeInstruction(dline, saveSel); // Spacepad it up to 28 characters size_t dline_len = strlen(dline);