fix non-dbg build compile errors and warnings

This commit is contained in:
ehouse 2009-12-03 03:05:35 +00:00
parent 8c21f74cc3
commit c8aa9d7f72
3 changed files with 16 additions and 6 deletions

View file

@ -406,14 +406,19 @@ ceMeasureGlyph( HDC hdc, HBITMAP bmp, wchar_t glyph,
DrawText( hdc, &glyph, 1, &rect, DT_TOP | DT_LEFT );
BITMAP bminfo;
int result = GetObject( bmp, sizeof(bminfo), &bminfo );
#ifdef DEBUG
int result =
#endif
GetObject( bmp, sizeof(bminfo), &bminfo );
XP_ASSERT( result != 0 );
/* Find out if this guy's taller than what we have */
const XP_U8* rowPtr = bminfo.bmBits;
if ( *rowPtr != 0x00 ) {
#ifdef DEBUG
wchar_t wbuf[2] = { glyph, 0 };
XP_LOGW( __func__, wbuf );
#endif
logBitmap( &bminfo, size.cx, size.cy );
}
for ( yy = 0; yy < minTopSeen; ++yy ) {
@ -527,7 +532,7 @@ ceBestFitFont( CEDrawCtx* dctx, RFIndex index, const XP_U16 soughtHeight,
wchar_t widebuf[65];
wchar_t widthBuf[minLen];
XP_U16 len, wlen;
XP_U16 hasMinTop, hasMaxBottom;
XP_U16 hasMinTop = 0, hasMaxBottom = 0; /* make compiler happy */
XP_Bool firstPass;
HDC memDC;
HBITMAP memBM;

View file

@ -43,9 +43,8 @@ stuffTextInField( HWND hDlg, StrBoxState* state )
XP_U16 len, crlen;
XP_UCHAR* sbuf;
wchar_t* wbuf;
CEAppGlobals* globals = state->dlgHdr.globals;
sbuf = XP_MALLOC( globals->mpool, nBytes + 1 );
sbuf = XP_MALLOC( state->dlgHdr.globals->mpool, nBytes + 1 );
stream_getBytes( state->stream, sbuf, nBytes );
crlen = strlen(XP_CR);
@ -55,9 +54,9 @@ stuffTextInField( HWND hDlg, StrBoxState* state )
sbuf[nBytes] = '\0';
len = MultiByteToWideChar( CP_UTF8, 0, sbuf, nBytes, NULL, 0 );
wbuf = XP_MALLOC( globals->mpool, (len+1) * sizeof(*wbuf) );
wbuf = XP_MALLOC( state->dlgHdr.globals->mpool, (len+1) * sizeof(*wbuf) );
MultiByteToWideChar( CP_UTF8, 0, sbuf, nBytes, wbuf, len );
XP_FREE( globals->mpool, sbuf );
XP_FREE( state->dlgHdr.globals>mpool, sbuf );
wbuf[len] = 0;
SetDlgItemText( hDlg, ID_EDITTEXT, wbuf );

View file

@ -608,11 +608,15 @@ END
# define CONN_LABEL_ROW_3 (CONN_LABEL_ROW_1)
# define CONN_EDIT_ROW_4 (CONN_LABEL_ROW_3+CONN_LABEL_HT+3)
# endif
# ifndef RELAY_NOEDIT_ADDR
# define CONN_LABEL_ROW_5 (CONN_EDIT_ROW_4+ROW_SPACE+5)
# define CONN_EDIT_ROW_6 (CONN_LABEL_ROW_5+CONN_LABEL_HT+3)
# define CONN_LABEL_ROW_7 (CONN_EDIT_ROW_6+ROW_SPACE+5)
# define CONN_EDIT_ROW_8 (CONN_LABEL_ROW_7+CONN_LABEL_HT+3)
# define BUTTON_ROW (CONN_EDIT_ROW_8+ROW_SPACE)
#else
# define BUTTON_ROW (CONN_EDIT_ROW_4+ROW_SPACE)
#endif
#ifdef _WIN32_WCE
# define CONNSDLG_HT BUTTON_ROW
#else
@ -638,6 +642,7 @@ BEGIN
EDITTEXT INVITE_EDIT,CTRL_COL,CONN_EDIT_ROW_4,CTRL_COL_WIDTH,
ROW_HEIGHT,ES_AUTOHSCROLL
#ifndef RELAY_NOEDIT_ADDR
LTEXT "Název přenosu (málokdy změněno):",IDC_CRELAYNAME_LAB,
LAB_COL,CONN_LABEL_ROW_5,90,CONN_LABEL_HT
EDITTEXT RELAYNAME_EDIT,CTRL_COL,CONN_EDIT_ROW_6,CTRL_COL_WIDTH,
@ -646,6 +651,7 @@ BEGIN
CONN_LABEL_ROW_7,90,CONN_LABEL_HT
EDITTEXT RELAYPORT_EDIT,CTRL_COL,CONN_EDIT_ROW_8,CTRL_COL_WIDTH,
ROW_HEIGHT,ES_AUTOHSCROLL | ES_NUMBER
#endif
#elif defined NEEDS_CHOOSE_CONNTYPE
LTEXT "Přenos není podporován.",IDC_INVITE_LAB,LAB_COL,
CONN_ROW_3,40,40