Commit 64de949c authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

More -Wmissing-declarations and -Wwrite-strings warning fixes.

parent b15c264d
......@@ -59,7 +59,7 @@ DEFINE_GUID( CLSID_MsiDatabase, 0x000c1084, 0x0000, 0x0000,
* 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, LPCWSTR szPersist, MSIDATABASE **pdb)
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, LPCWSTR szPersist, MSIDATABASE **pdb)
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 szDBPath, LPCSTR szPersist, MSIHANDLE *phDB)
goto end;
}
else
szwPersist = (LPWSTR) szPersist;
szwPersist = (LPWSTR)(DWORD)szPersist;
r = MsiOpenDatabaseW( szwDBPath, szwPersist, phDB );
......
......@@ -117,7 +117,7 @@ static LRESULT WINAPI MSIRadioGroup_WndProc(HWND hWnd, UINT msg, WPARAM wParam,
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;
}
......
......@@ -41,7 +41,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi);
typedef void (*EVENTHANDLER)(MSIPACKAGE*,LPCWSTR,msi_dialog *);
struct _events {
LPSTR event;
LPCSTR event;
EVENTHANDLER handler;
};
......
......@@ -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( MSIRECORD *, unsigned int );
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 *stg );
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( MSIPACKAGE *, LPCWSTR, LPCWSTR );
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 * );
......
......@@ -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;
......
......@@ -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;
......
......@@ -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( MSIHANDLE handle, unsigned int iField, LPCWSTR
}
/* 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;
......
......@@ -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, MSITABLE *table )
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 name, MSITABLE **ptable)
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 tagMSIVIEW *view, UINT row, UINT col, UINT val
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment