Fixed some of the issues reported by Solaris Lint.

This commit is contained in:
Patrik Stridvall 1999-07-31 17:36:48 +00:00 committed by Alexandre Julliard
parent cf4333240c
commit 2c684081c1
15 changed files with 193 additions and 186 deletions

View File

@ -69,8 +69,8 @@ void GENERIC_ScrollUpWindow(char row1, char col1, char row2, char col2,
{ {
/* Scroll Up Window: Characters go down */ /* Scroll Up Window: Characters go down */
char trow, tcol; char trow, tcol, x;
int old_refresh, x; int old_refresh;
TRACE("Scroll Up %d lines from %d to %d.\n", lines, row1, TRACE("Scroll Up %d lines from %d to %d.\n", lines, row1,
row2); row2);
@ -101,8 +101,8 @@ void GENERIC_ScrollDownWindow(char row1, char col1, char row2, char col2,
{ {
/* Scroll Down Window: Characters go up */ /* Scroll Down Window: Characters go up */
char trow, tcol; char trow, tcol, x;
int old_refresh, x; int old_refresh;
/* Abort if we have only partial functionality */ /* Abort if we have only partial functionality */
if (!(driver.getCursorPosition && driver.moveCursor && driver.write if (!(driver.getCursorPosition && driver.moveCursor && driver.write
@ -144,7 +144,7 @@ static void GENERIC_ClearLine(char row, char col1, char col2, int bgcolor,
functions but may be useful elsewhere. If it can be used from functions but may be useful elsewhere. If it can be used from
outside here, it should be made non-static */ outside here, it should be made non-static */
int x; char x;
TRACE("Clear Line: %d from %d to %d.\n", row, col1, col2); TRACE("Clear Line: %d from %d to %d.\n", row, col1, col2);
@ -165,7 +165,7 @@ static void GENERIC_MoveLine(char row1, char row2, char col1, char col2)
functions but may be useful elsewhere. If it can be used from functions but may be useful elsewhere. If it can be used from
outside here, it should be made non-static */ outside here, it should be made non-static */
int x; char x;
int bg_color, fg_color, attribute; int bg_color, fg_color, attribute;
char ch; char ch;

View File

@ -25,8 +25,8 @@ DEFAULT_DEBUG_CHANNEL(console)
char console_xterm_prog[80]; char console_xterm_prog[80];
static BOOL wine_create_console(FILE **master, FILE **slave, int *pid); static BOOL wine_create_console(FILE **master, FILE **slave, pid_t *pid);
FILE *wine_openpty(int *master, int *slave, char *name, int wine_openpty(int *master, int *slave, char *name,
struct termios *term, struct winsize *winsize); struct termios *term, struct winsize *winsize);
/* The console -- I chose to keep the master and slave /* The console -- I chose to keep the master and slave
@ -36,7 +36,7 @@ FILE *wine_openpty(int *master, int *slave, char *name,
typedef struct _XTERM_CONSOLE { typedef struct _XTERM_CONSOLE {
FILE *master; /* xterm side of pty */ FILE *master; /* xterm side of pty */
FILE *slave; /* wine side of pty */ FILE *slave; /* wine side of pty */
int pid; /* xterm's pid, -1 if no xterm */ pid_t pid; /* xterm's pid, -1 if no xterm */
} XTERM_CONSOLE; } XTERM_CONSOLE;
static XTERM_CONSOLE xterm_console; static XTERM_CONSOLE xterm_console;
@ -109,7 +109,7 @@ void XTERM_ResizeScreen(int x, int y)
} }
static BOOL wine_create_console(FILE **master, FILE **slave, int *pid) static BOOL wine_create_console(FILE **master, FILE **slave, pid_t *pid)
{ {
/* There is definately a bug in this routine that causes a lot /* There is definately a bug in this routine that causes a lot
of garbage to be written to the screen, but I can't find it... of garbage to be written to the screen, but I can't find it...

View File

@ -5,6 +5,8 @@
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include "gdi.h" #include "gdi.h"
#include "dc.h" #include "dc.h"
#include "enhmetafiledrv.h" #include "enhmetafiledrv.h"

View File

@ -6,6 +6,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include "bitmap.h" #include "bitmap.h"
#include "brush.h" #include "brush.h"
#include "font.h" #include "font.h"

View File

@ -4,6 +4,8 @@
* Copyright 1993, 1994 Alexandre Julliard * Copyright 1993, 1994 Alexandre Julliard
*/ */
#include <string.h>
#include "gdi.h" #include "gdi.h"
#include "metafiledrv.h" #include "metafiledrv.h"
#include "heap.h" #include "heap.h"

View File

@ -5,6 +5,8 @@
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include "gdi.h" #include "gdi.h"
#include "dc.h" #include "dc.h"
#include "region.h" #include "region.h"

View File

@ -6,6 +6,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include "bitmap.h" #include "bitmap.h"
#include "brush.h" #include "brush.h"
#include "font.h" #include "font.h"

View File

@ -5,6 +5,8 @@
* *
*/ */
#include <string.h>
#include "windef.h" #include "windef.h"
#include "metafiledrv.h" #include "metafiledrv.h"
#include "debugtools.h" #include "debugtools.h"

View File

@ -8,167 +8,164 @@
const char * const debug_cl_name[] = { "fixme", "err", "warn", "trace" }; const char * const debug_cl_name[] = { "fixme", "err", "warn", "trace" };
int dbch_accel = 0; const int dbch_accel = 0;
int dbch_advapi = 1; const int dbch_advapi = 1;
int dbch_animate = 2; const int dbch_animate = 2;
int dbch_aspi = 3; const int dbch_aspi = 3;
int dbch_atom = 4; const int dbch_atom = 4;
int dbch_avifile = 5; const int dbch_avifile = 5;
int dbch_bitblt = 6; const int dbch_bitblt = 6;
int dbch_bitmap = 7; const int dbch_bitmap = 7;
int dbch_caret = 8; const int dbch_caret = 8;
int dbch_cdaudio = 9; const int dbch_cdaudio = 9;
int dbch_class = 10; const int dbch_class = 10;
int dbch_clipboard = 11; const int dbch_clipboard = 11;
int dbch_clipping = 12; const int dbch_clipping = 12;
int dbch_combo = 13; const int dbch_combo = 13;
int dbch_comboex = 14; const int dbch_comboex = 14;
int dbch_comm = 15; const int dbch_comm = 15;
int dbch_commctrl = 16; const int dbch_commctrl = 16;
int dbch_commdlg = 17; const int dbch_commdlg = 17;
int dbch_console = 18; const int dbch_console = 18;
int dbch_crtdll = 19; const int dbch_crtdll = 19;
int dbch_cursor = 20; const int dbch_cursor = 20;
int dbch_datetime = 21; const int dbch_datetime = 21;
int dbch_dc = 22; const int dbch_dc = 22;
int dbch_dde = 23; const int dbch_ddeml = 23;
int dbch_ddeml = 24; const int dbch_ddraw = 24;
int dbch_ddraw = 25; const int dbch_debug = 25;
int dbch_debug = 26; const int dbch_delayhlp = 26;
int dbch_delayhlp = 27; const int dbch_dialog = 27;
int dbch_dialog = 28; const int dbch_dinput = 28;
int dbch_dinput = 29; const int dbch_dll = 29;
int dbch_dll = 30; const int dbch_dosfs = 30;
int dbch_dosfs = 31; const int dbch_dosmem = 31;
int dbch_dosmem = 32; const int dbch_dplay = 32;
int dbch_dplay = 33; const int dbch_driver = 33;
int dbch_driver = 34; const int dbch_dsound = 34;
int dbch_dsound = 35; const int dbch_edit = 35;
int dbch_edit = 36; const int dbch_elfdll = 36;
int dbch_elfdll = 37; const int dbch_enhmetafile = 37;
int dbch_enhmetafile = 38; const int dbch_event = 38;
int dbch_event = 39; const int dbch_exec = 39;
int dbch_exec = 40; const int dbch_file = 40;
int dbch_file = 41; const int dbch_fixup = 41;
int dbch_fixup = 42; const int dbch_font = 42;
int dbch_font = 43; const int dbch_gdi = 43;
int dbch_gdi = 44; const int dbch_global = 44;
int dbch_global = 45; const int dbch_graphics = 45;
int dbch_graphics = 46; const int dbch_header = 46;
int dbch_header = 47; const int dbch_heap = 47;
int dbch_heap = 48; const int dbch_hook = 48;
int dbch_hook = 49; const int dbch_hotkey = 49;
int dbch_hotkey = 50; const int dbch_icon = 50;
int dbch_icon = 51; const int dbch_imagehlp = 51;
int dbch_imagehlp = 52; const int dbch_imagelist = 52;
int dbch_imagelist = 53; const int dbch_imm = 53;
int dbch_imm = 54; const int dbch_int = 54;
int dbch_int = 55; const int dbch_int10 = 55;
int dbch_int10 = 56; const int dbch_int16 = 56;
int dbch_int16 = 57; const int dbch_int17 = 57;
int dbch_int17 = 58; const int dbch_int19 = 58;
int dbch_int19 = 59; const int dbch_int21 = 59;
int dbch_int21 = 60; const int dbch_int31 = 60;
int dbch_int31 = 61; const int dbch_io = 61;
int dbch_io = 62; const int dbch_ipaddress = 62;
int dbch_ipaddress = 63; const int dbch_key = 63;
int dbch_key = 64; const int dbch_keyboard = 64;
int dbch_keyboard = 65; const int dbch_ldt = 65;
int dbch_ldt = 66; const int dbch_listbox = 66;
int dbch_listbox = 67; const int dbch_listview = 67;
int dbch_listview = 68; const int dbch_local = 68;
int dbch_local = 69; const int dbch_mci = 69;
int dbch_mci = 70; const int dbch_mcianim = 70;
int dbch_mcianim = 71; const int dbch_mciavi = 71;
int dbch_mciavi = 72; const int dbch_mcimidi = 72;
int dbch_mcimidi = 73; const int dbch_mciwave = 73;
int dbch_mciwave = 74; const int dbch_mdi = 74;
int dbch_mdi = 75; const int dbch_menu = 75;
int dbch_menu = 76; const int dbch_message = 76;
int dbch_message = 77; const int dbch_metafile = 77;
int dbch_metafile = 78; const int dbch_midi = 78;
int dbch_midi = 79; const int dbch_mmaux = 79;
int dbch_mmaux = 80; const int dbch_mmio = 80;
int dbch_mmio = 81; const int dbch_mmsys = 81;
int dbch_mmsys = 82; const int dbch_mmtime = 82;
int dbch_mmtime = 83; const int dbch_module = 83;
int dbch_module = 84; const int dbch_monthcal = 84;
int dbch_monthcal = 85; const int dbch_mpr = 85;
int dbch_mpr = 86; const int dbch_msacm = 86;
int dbch_msacm = 87; const int dbch_msg = 87;
int dbch_msg = 88; const int dbch_msvideo = 88;
int dbch_msvideo = 89; const int dbch_nativefont = 89;
int dbch_nativefont = 90; const int dbch_nonclient = 90;
int dbch_nonclient = 91; const int dbch_ntdll = 91;
int dbch_ntdll = 92; const int dbch_ole = 92;
int dbch_ole = 93; const int dbch_pager = 93;
int dbch_pager = 94; const int dbch_palette = 94;
int dbch_palette = 95; const int dbch_pidl = 95;
int dbch_pidl = 96; const int dbch_print = 96;
int dbch_print = 97; const int dbch_process = 97;
int dbch_process = 98; const int dbch_profile = 98;
int dbch_profile = 99; const int dbch_progress = 99;
int dbch_progress = 100; const int dbch_prop = 100;
int dbch_prop = 101; const int dbch_propsheet = 101;
int dbch_propsheet = 102; const int dbch_psapi = 102;
int dbch_psapi = 103; const int dbch_psdrv = 103;
int dbch_psdrv = 104; const int dbch_ras = 104;
int dbch_ras = 105; const int dbch_rebar = 105;
int dbch_rebar = 106; const int dbch_reg = 106;
int dbch_reg = 107; const int dbch_region = 107;
int dbch_region = 108; const int dbch_relay = 108;
int dbch_relay = 109; const int dbch_resource = 109;
int dbch_resource = 110; const int dbch_scroll = 110;
int dbch_scroll = 111; const int dbch_security = 111;
int dbch_security = 112; const int dbch_segment = 112;
int dbch_segment = 113; const int dbch_seh = 113;
int dbch_seh = 114; const int dbch_selector = 114;
int dbch_selector = 115; const int dbch_sendmsg = 115;
int dbch_sem = 116; const int dbch_server = 116;
int dbch_sendmsg = 117; const int dbch_shell = 117;
int dbch_server = 118; const int dbch_snoop = 118;
int dbch_shell = 119; const int dbch_sound = 119;
int dbch_shm = 120; const int dbch_static = 120;
int dbch_snoop = 121; const int dbch_statusbar = 121;
int dbch_sound = 122; const int dbch_storage = 122;
int dbch_static = 123; const int dbch_stress = 123;
int dbch_statusbar = 124; const int dbch_string = 124;
int dbch_storage = 125; const int dbch_syscolor = 125;
int dbch_stress = 126; const int dbch_system = 126;
int dbch_string = 127; const int dbch_tab = 127;
int dbch_syscolor = 128; const int dbch_tapi = 128;
int dbch_system = 129; const int dbch_task = 129;
int dbch_tab = 130; const int dbch_text = 130;
int dbch_tapi = 131; const int dbch_thread = 131;
int dbch_task = 132; const int dbch_thunk = 132;
int dbch_text = 133; const int dbch_timer = 133;
int dbch_thread = 134; const int dbch_toolbar = 134;
int dbch_thunk = 135; const int dbch_toolhelp = 135;
int dbch_timer = 136; const int dbch_tooltips = 136;
int dbch_toolbar = 137; const int dbch_trackbar = 137;
int dbch_toolhelp = 138; const int dbch_treeview = 138;
int dbch_tooltips = 139; const int dbch_ttydrv = 139;
int dbch_trackbar = 140; const int dbch_tweak = 140;
int dbch_treeview = 141; const int dbch_typelib = 141;
int dbch_ttydrv = 142; const int dbch_updown = 142;
int dbch_tweak = 143; const int dbch_ver = 143;
int dbch_typelib = 144; const int dbch_virtual = 144;
int dbch_updown = 145; const int dbch_vxd = 145;
int dbch_ver = 146; const int dbch_wave = 146;
int dbch_virtual = 147; const int dbch_win = 147;
int dbch_vxd = 148; const int dbch_win16drv = 148;
int dbch_wave = 149; const int dbch_win32 = 149;
int dbch_win = 150; const int dbch_wing = 150;
int dbch_win16drv = 151; const int dbch_winsock = 151;
int dbch_win32 = 152; const int dbch_winspool = 152;
int dbch_wing = 153; const int dbch_wnet = 153;
int dbch_winsock = 154; const int dbch_x11 = 154;
int dbch_winspool = 155; const int dbch_x11drv = 155;
int dbch_wnet = 156;
int dbch_x11 = 157;
int dbch_x11drv = 158;
#define DEBUG_CHANNEL_COUNT 159 #define DEBUG_CHANNEL_COUNT 156
char __debug_msg_enabled[DEBUG_CHANNEL_COUNT][DEBUG_CLASS_COUNT] = { char __debug_msg_enabled[DEBUG_CHANNEL_COUNT][DEBUG_CLASS_COUNT] = {
{1, 1, 0, 0}, {1, 1, 0, 0},
@ -326,9 +323,6 @@ char __debug_msg_enabled[DEBUG_CHANNEL_COUNT][DEBUG_CLASS_COUNT] = {
{1, 1, 0, 0}, {1, 1, 0, 0},
{1, 1, 0, 0}, {1, 1, 0, 0},
{1, 1, 0, 0}, {1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0} {1, 1, 0, 0}
}; };
@ -356,7 +350,6 @@ const char * const debug_ch_name[DEBUG_CHANNEL_COUNT] = {
"cursor", "cursor",
"datetime", "datetime",
"dc", "dc",
"dde",
"ddeml", "ddeml",
"ddraw", "ddraw",
"debug", "debug",
@ -449,11 +442,9 @@ const char * const debug_ch_name[DEBUG_CHANNEL_COUNT] = {
"segment", "segment",
"seh", "seh",
"selector", "selector",
"sem",
"sendmsg", "sendmsg",
"server", "server",
"shell", "shell",
"shm",
"snoop", "snoop",
"sound", "sound",
"static", "static",

View File

@ -5,9 +5,9 @@
extern "C" { extern "C" {
#endif #endif
void *xmalloc( int size ); void *xmalloc( size_t size );
void *xcalloc( int size ); void *xcalloc( size_t size );
void *xrealloc( void *ptr, int size ); void *xrealloc( void *ptr, size_t size );
char *xstrdup( const char *str ); char *xstrdup( const char *str );
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -18,7 +18,7 @@
#include "xmalloc.h" #include "xmalloc.h"
#include "debugtools.h" #include "debugtools.h"
void *xmalloc( int size ) void *xmalloc( size_t size )
{ {
void *res; void *res;
@ -32,7 +32,7 @@ void *xmalloc( int size )
return res; return res;
} }
void *xcalloc( int size ) void *xcalloc( size_t size )
{ {
void *res; void *res;
@ -42,7 +42,7 @@ void *xcalloc( int size )
} }
void *xrealloc( void *ptr, int size ) void *xrealloc( void *ptr, size_t size )
{ {
void *res = realloc (ptr, size); void *res = realloc (ptr, size);
if ((res == NULL) && size) if ((res == NULL) && size)

View File

@ -4,6 +4,8 @@
* Copyright (C) 1999 Alexandre Julliard * Copyright (C) 1999 Alexandre Julliard
*/ */
#include <string.h>
#include "process.h" #include "process.h"
#include "thread.h" #include "thread.h"
#include "server.h" #include "server.h"

View File

@ -5,6 +5,8 @@
*/ */
#include <assert.h> #include <assert.h>
#include <string.h>
#include "winbase.h" #include "winbase.h"
#include "winerror.h" #include "winerror.h"

View File

@ -30,7 +30,7 @@ EOF
chno=0 chno=0
for ch in $DEBUG_CHANNELS for ch in $DEBUG_CHANNELS
do do
echo "int dbch_$ch = $chno;" echo "const int dbch_$ch = $chno;"
chno=`expr $chno + 1` chno=`expr $chno + 1`
done done
echo echo

View File

@ -53,7 +53,7 @@ DEFAULT_DEBUG_CHANNEL(console)
/* FIXME: Should be in an internal header file. OK, so which one? /* FIXME: Should be in an internal header file. OK, so which one?
Used by CONSOLE_makecomplex. */ Used by CONSOLE_makecomplex. */
FILE *wine_openpty(int *master, int *slave, char *name, int wine_openpty(int *master, int *slave, char *name,
struct termios *term, struct winsize *winsize); struct termios *term, struct winsize *winsize);
/**************************************************************************** /****************************************************************************