MSI: more -Wmissing-declarations and -Wwrite-strings warning fixes
Mike McCormack
mike at codeweavers.com
Mon May 30 06:15:08 CDT 2005
ChangeLog:
* more -Wmissing-declarations and -Wwrite-strings warning fixes
-------------- next part --------------
Index: dlls/msi/database.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/database.c,v
retrieving revision 1.3
diff -u -p -r1.3 database.c
--- dlls/msi/database.c 10 May 2005 16:00:19 -0000 1.3
+++ dlls/msi/database.c 30 May 2005 09:28:37 -0000
@@ -59,7 +59,7 @@ DEFINE_GUID( CLSID_MsiDatabase, 0x000c10
* Any binary data in a table is a reference to a stream.
*/
-VOID MSI_CloseDatabase( MSIOBJECTHDR *arg )
+static VOID MSI_CloseDatabase( MSIOBJECTHDR *arg )
{
MSIDATABASE *db = (MSIDATABASE *) arg;
DWORD r;
@@ -77,7 +77,7 @@ UINT MSI_OpenDatabaseW(LPCWSTR szDBPath,
HRESULT r;
MSIDATABASE *db = NULL;
UINT ret = ERROR_FUNCTION_FAILED;
- LPWSTR szMode;
+ LPCWSTR szMode;
STATSTG stat;
TRACE("%s %s\n",debugstr_w(szDBPath),debugstr_w(szPersist) );
@@ -85,7 +85,7 @@ UINT MSI_OpenDatabaseW(LPCWSTR szDBPath,
if( !pdb )
return ERROR_INVALID_PARAMETER;
- szMode = (LPWSTR) szPersist;
+ szMode = szPersist;
if( HIWORD( szPersist ) )
{
/* UINT len = lstrlenW( szPerist ) + 1; */
@@ -209,7 +209,7 @@ UINT WINAPI MsiOpenDatabaseA(LPCSTR szDB
goto end;
}
else
- szwPersist = (LPWSTR) szPersist;
+ szwPersist = (LPWSTR)(DWORD)szPersist;
r = MsiOpenDatabaseW( szwDBPath, szwPersist, phDB );
Index: dlls/msi/dialog.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/dialog.c,v
retrieving revision 1.14
diff -u -p -r1.14 dialog.c
--- dlls/msi/dialog.c 9 May 2005 19:33:50 -0000 1.14
+++ dlls/msi/dialog.c 30 May 2005 09:28:38 -0000
@@ -117,7 +117,7 @@ static LRESULT WINAPI MSIRadioGroup_WndP
static DWORD uiThreadId;
static HWND hMsiHiddenWindow;
-INT msi_dialog_scale_unit( msi_dialog *dialog, INT val )
+static INT msi_dialog_scale_unit( msi_dialog *dialog, INT val )
{
return (dialog->scale * val + 5) / 10;
}
Index: dlls/msi/events.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/events.c,v
retrieving revision 1.2
diff -u -p -r1.2 events.c
--- dlls/msi/events.c 27 May 2005 19:24:22 -0000 1.2
+++ dlls/msi/events.c 30 May 2005 09:28:38 -0000
@@ -41,7 +41,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi);
typedef void (*EVENTHANDLER)(MSIPACKAGE*,LPCWSTR,msi_dialog *);
struct _events {
- LPSTR event;
+ LPCSTR event;
EVENTHANDLER handler;
};
Index: dlls/msi/msipriv.h
===================================================================
RCS file: /home/wine/wine/dlls/msi/msipriv.h,v
retrieving revision 1.60
diff -u -p -r1.60 msipriv.h
--- dlls/msi/msipriv.h 27 May 2005 19:24:22 -0000 1.60
+++ dlls/msi/msipriv.h 30 May 2005 09:28:38 -0000
@@ -66,7 +66,7 @@ typedef struct tagMSIDATABASE
MSIOBJECTHDR hdr;
IStorage *storage;
string_table *strings;
- LPWSTR mode;
+ LPCWSTR mode;
MSITABLE *first_table, *last_table;
} MSIDATABASE;
@@ -318,12 +318,16 @@ extern const WCHAR *MSI_RecordGetString(
extern MSIRECORD *MSI_CreateRecord( unsigned int );
extern UINT MSI_RecordSetInteger( MSIRECORD *, unsigned int, int );
extern UINT MSI_RecordSetStringW( MSIRECORD *, unsigned int, LPCWSTR );
+extern UINT MSI_RecordSetStringA( MSIRECORD *, unsigned int, LPCSTR );
extern BOOL MSI_RecordIsNull( MSIRECORD *, unsigned int );
extern UINT MSI_RecordGetStringW( MSIRECORD * , unsigned int, LPWSTR, DWORD *);
extern UINT MSI_RecordGetStringA( MSIRECORD *, unsigned int, LPSTR, DWORD *);
extern int MSI_RecordGetInteger( MSIRECORD *, unsigned int );
extern UINT MSI_RecordReadStream( MSIRECORD *, unsigned int, char *, DWORD *);
extern unsigned int MSI_RecordGetFieldCount( MSIRECORD *rec );
+extern UINT MSI_RecordSetStreamW( MSIRECORD *, unsigned int, LPCWSTR );
+extern UINT MSI_RecordSetStreamA( MSIRECORD *, unsigned int, LPCSTR );
+extern UINT MSI_RecordDataSize( MSIRECORD *, unsigned int );
/* stream internals */
extern UINT get_raw_stream( MSIHANDLE hdb, LPCWSTR stname, IStream **stm );
@@ -334,8 +338,11 @@ extern void enum_stream_names( IStorage
extern UINT MSI_OpenDatabaseW( LPCWSTR, LPCWSTR, MSIDATABASE ** );
extern UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY ** );
extern UINT MSI_OpenQuery( MSIDATABASE *, MSIQUERY **, LPCWSTR, ... );
-typedef UINT (*record_func)( MSIRECORD *rec, LPVOID param );
+typedef UINT (*record_func)( MSIRECORD *, LPVOID );
extern UINT MSI_IterateRecords( MSIQUERY *, DWORD *, record_func, LPVOID );
+extern UINT MSI_DatabaseImport( MSIDATABASE *, LPCWSTR, LPCWSTR );
+extern UINT MSI_DatabaseExport( MSIDATABASE *, LPCWSTR, LPCWSTR, LPCWSTR );
+extern UINT MSI_DatabaseGetPrimaryKeys( MSIDATABASE *, LPCWSTR, MSIRECORD ** );
/* view internals */
extern UINT MSI_ViewExecute( MSIQUERY*, MSIRECORD * );
@@ -349,6 +356,7 @@ extern UINT MSI_SetTargetPathW( MSIPACKA
extern UINT MSI_SetPropertyW( MSIPACKAGE *, LPCWSTR, LPCWSTR );
extern INT MSI_ProcessMessage( MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD * );
extern UINT MSI_GetPropertyW( MSIPACKAGE *, LPCWSTR, LPWSTR, DWORD * );
+extern UINT MSI_GetPropertyA(MSIPACKAGE *, LPCSTR, LPSTR, DWORD* );
extern MSICONDITION MSI_EvaluateConditionW( MSIPACKAGE *, LPCWSTR );
extern UINT MSI_SetPropertyW( MSIPACKAGE *, LPCWSTR, LPCWSTR );
extern UINT MSI_GetComponentStateW( MSIPACKAGE *, LPWSTR, INSTALLSTATE *, INSTALLSTATE * );
Index: dlls/msi/msiquery.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/msiquery.c,v
retrieving revision 1.29
diff -u -p -r1.29 msiquery.c
--- dlls/msi/msiquery.c 23 May 2005 12:08:17 -0000 1.29
+++ dlls/msi/msiquery.c 30 May 2005 09:28:38 -0000
@@ -38,7 +38,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(msi);
-void MSI_CloseView( MSIOBJECTHDR *arg )
+static void MSI_CloseView( MSIOBJECTHDR *arg )
{
MSIQUERY *query = (MSIQUERY*) arg;
struct list *ptr, *t;
Index: dlls/msi/package.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/package.c,v
retrieving revision 1.41
diff -u -p -r1.41 package.c
--- dlls/msi/package.c 20 May 2005 09:40:14 -0000 1.41
+++ dlls/msi/package.c 30 May 2005 09:28:38 -0000
@@ -49,7 +49,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi);
*/
#define LPCTSTR LPCWSTR
-void MSI_FreePackage( MSIOBJECTHDR *arg)
+static void MSI_FreePackage( MSIOBJECTHDR *arg)
{
MSIPACKAGE *package= (MSIPACKAGE*) arg;
Index: dlls/msi/record.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/record.c,v
retrieving revision 1.27
diff -u -p -r1.27 record.c
--- dlls/msi/record.c 27 May 2005 09:26:13 -0000 1.27
+++ dlls/msi/record.c 30 May 2005 09:28:38 -0000
@@ -44,7 +44,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi);
#define MSIFIELD_WSTR 3
#define MSIFIELD_STREAM 4
-void MSI_FreeField( MSIFIELD *field )
+static void MSI_FreeField( MSIFIELD *field )
{
switch( field->type )
{
@@ -62,7 +62,7 @@ void MSI_FreeField( MSIFIELD *field )
}
}
-void MSI_CloseRecord( MSIOBJECTHDR *arg )
+static void MSI_CloseRecord( MSIOBJECTHDR *arg )
{
MSIRECORD *rec = (MSIRECORD *) arg;
UINT i;
@@ -546,7 +546,7 @@ UINT WINAPI MsiRecordSetStringW( MSIHAND
}
/* read the data in a file into an IStream */
-UINT RECORD_StreamFromFile(LPCWSTR szFile, IStream **pstm)
+static UINT RECORD_StreamFromFile(LPCWSTR szFile, IStream **pstm)
{
DWORD sz, szHighWord = 0, read;
HANDLE handle;
Index: dlls/msi/table.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/table.c,v
retrieving revision 1.34
diff -u -p -r1.34 table.c
--- dlls/msi/table.c 20 May 2005 19:16:50 -0000 1.34
+++ dlls/msi/table.c 30 May 2005 09:28:39 -0000
@@ -397,7 +397,7 @@ end:
return ret;
}
-UINT read_table_from_storage( MSIDATABASE *db, LPCWSTR name, MSITABLE **ptable)
+static UINT read_table_from_storage( MSIDATABASE *db, LPCWSTR name, MSITABLE **ptable)
{
MSITABLE *t;
USHORT *rawdata = NULL;
@@ -507,7 +507,7 @@ void remove_table( MSIDATABASE *db, MSIT
table->prev = NULL;
}
-void release_table( MSIDATABASE *db, MSITABLE *table )
+static void release_table( MSIDATABASE *db, MSITABLE *table )
{
if( !table->ref_count )
ERR("Trying to destroy table with refcount 0\n");
@@ -610,7 +610,7 @@ UINT get_table(MSIDATABASE *db, LPCWSTR
return ERROR_SUCCESS;
}
-UINT save_table( MSIDATABASE *db, MSITABLE *t )
+static UINT save_table( MSIDATABASE *db, MSITABLE *t )
{
USHORT *rawdata = NULL, *p;
UINT rawsize, r, i, j, row_size, num_cols = 0;
@@ -751,7 +751,7 @@ end:
return ret;
}
-UINT save_string_table( MSIDATABASE *db )
+static UINT save_string_table( MSIDATABASE *db )
{
UINT i, count, datasize, poolsize, sz, used, r, codepage;
UINT ret = ERROR_FUNCTION_FAILED;
@@ -858,7 +858,7 @@ struct standard_table {
#define STANDARD_TABLE_COUNT \
(sizeof(MSI_standard_tables)/sizeof(struct standard_table))
-UINT get_defaulttablecolumns( LPCWSTR szTable, MSICOLUMNINFO *colinfo, UINT *sz)
+static UINT get_defaulttablecolumns( LPCWSTR szTable, MSICOLUMNINFO *colinfo, UINT *sz)
{
DWORD i, n=0;
@@ -1167,7 +1167,7 @@ static UINT TABLE_set_int( struct tagMSI
return ERROR_SUCCESS;
}
-UINT TABLE_insert_row( struct tagMSIVIEW *view, UINT *num )
+static UINT TABLE_insert_row( struct tagMSIVIEW *view, UINT *num )
{
MSITABLEVIEW *tv = (MSITABLEVIEW*)view;
USHORT **p, *row;
More information about the wine-patches
mailing list