-Wmissing-declarations and -Wwrite-strings warning fixes.
This commit is contained in:
parent
4e3fd5f3c3
commit
b58a098a11
|
@ -38,7 +38,7 @@
|
||||||
#define YYLEX_PARAM info
|
#define YYLEX_PARAM info
|
||||||
#define YYPARSE_PARAM info
|
#define YYPARSE_PARAM info
|
||||||
|
|
||||||
static int COND_error(char *str);
|
static int COND_error(const char *str);
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
||||||
|
|
||||||
|
@ -722,7 +722,7 @@ static LPWSTR COND_GetLiteral( struct cond_str *str )
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int COND_error(char *str)
|
static int COND_error(const char *str)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -421,7 +421,7 @@ static DWORD deformat_string_internal(MSIPACKAGE *package, LPCWSTR ptr,
|
||||||
/* not formatted */
|
/* not formatted */
|
||||||
*data = HeapAlloc(GetProcessHeap(),0,(len*sizeof(WCHAR)));
|
*data = HeapAlloc(GetProcessHeap(),0,(len*sizeof(WCHAR)));
|
||||||
memcpy(*data,ptr,len*sizeof(WCHAR));
|
memcpy(*data,ptr,len*sizeof(WCHAR));
|
||||||
TRACE("Returning %s\n",debugstr_w(*data));
|
TRACE("Returning %s\n",debugstr_wn(*data,len));
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,12 +47,13 @@ static void test_msidatabase(void)
|
||||||
ok( res == TRUE, "Falled to delete database\n" );
|
ok( res == TRUE, "Falled to delete database\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_msiinsert(void)
|
static void test_msiinsert(void)
|
||||||
{
|
{
|
||||||
const char *msifile = "winetest.msi";
|
const char *msifile = "winetest.msi";
|
||||||
MSIHANDLE hdb = 0, hview = 0, hrec = 0;
|
MSIHANDLE hdb = 0, hview = 0, hrec = 0;
|
||||||
UINT r;
|
UINT r;
|
||||||
char *query, buf[80];
|
const char *query;
|
||||||
|
char buf[80];
|
||||||
DWORD sz;
|
DWORD sz;
|
||||||
|
|
||||||
DeleteFile(msifile);
|
DeleteFile(msifile);
|
||||||
|
@ -129,10 +130,10 @@ void test_msiinsert(void)
|
||||||
typedef UINT (WINAPI *fnMsiDecomposeDescriptorA)(LPCSTR, LPCSTR, LPSTR, LPSTR, DWORD *);
|
typedef UINT (WINAPI *fnMsiDecomposeDescriptorA)(LPCSTR, LPCSTR, LPSTR, LPSTR, DWORD *);
|
||||||
fnMsiDecomposeDescriptorA MsiDecomposeDescriptorA;
|
fnMsiDecomposeDescriptorA MsiDecomposeDescriptorA;
|
||||||
|
|
||||||
void test_msidecomposedesc(void)
|
static void test_msidecomposedesc(void)
|
||||||
{
|
{
|
||||||
char prod[MAX_FEATURE_CHARS+1], comp[MAX_FEATURE_CHARS+1], feature[MAX_FEATURE_CHARS+1];
|
char prod[MAX_FEATURE_CHARS+1], comp[MAX_FEATURE_CHARS+1], feature[MAX_FEATURE_CHARS+1];
|
||||||
char *desc;
|
const char *desc;
|
||||||
UINT r;
|
UINT r;
|
||||||
DWORD len;
|
DWORD len;
|
||||||
HMODULE hmod;
|
HMODULE hmod;
|
||||||
|
@ -177,7 +178,7 @@ void test_msidecomposedesc(void)
|
||||||
ok(len == (strlen(desc) - strlen("extra")), "length wrong\n");
|
ok(len == (strlen(desc) - strlen("extra")), "length wrong\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT try_query_param( MSIHANDLE hdb, LPSTR szQuery, MSIHANDLE hrec )
|
static UINT try_query_param( MSIHANDLE hdb, LPCSTR szQuery, MSIHANDLE hrec )
|
||||||
{
|
{
|
||||||
MSIHANDLE htab = 0;
|
MSIHANDLE htab = 0;
|
||||||
UINT res;
|
UINT res;
|
||||||
|
@ -202,12 +203,12 @@ static UINT try_query_param( MSIHANDLE hdb, LPSTR szQuery, MSIHANDLE hrec )
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT try_query( MSIHANDLE hdb, LPSTR szQuery )
|
static UINT try_query( MSIHANDLE hdb, LPCSTR szQuery )
|
||||||
{
|
{
|
||||||
return try_query_param( hdb, szQuery, 0 );
|
return try_query_param( hdb, szQuery, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT try_insert_query( MSIHANDLE hdb, LPSTR szQuery )
|
static UINT try_insert_query( MSIHANDLE hdb, LPCSTR szQuery )
|
||||||
{
|
{
|
||||||
MSIHANDLE hrec = 0;
|
MSIHANDLE hrec = 0;
|
||||||
UINT r;
|
UINT r;
|
||||||
|
@ -221,7 +222,7 @@ static UINT try_insert_query( MSIHANDLE hdb, LPSTR szQuery )
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_msibadqueries()
|
static void test_msibadqueries()
|
||||||
{
|
{
|
||||||
const char *msifile = "winetest.msi";
|
const char *msifile = "winetest.msi";
|
||||||
MSIHANDLE hdb = 0;
|
MSIHANDLE hdb = 0;
|
||||||
|
|
|
@ -45,7 +45,7 @@ static BOOL create_temp_file(char *name)
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_msirecord(void)
|
static void test_msirecord(void)
|
||||||
{
|
{
|
||||||
DWORD r, sz;
|
DWORD r, sz;
|
||||||
INT i;
|
INT i;
|
||||||
|
|
|
@ -158,7 +158,7 @@ static const Keyword aKeywordTable[] = {
|
||||||
** keyword. If it is a keyword, the token code of that keyword is
|
** keyword. If it is a keyword, the token code of that keyword is
|
||||||
** returned. If the input is not a keyword, TK_ID is returned.
|
** returned. If the input is not a keyword, TK_ID is returned.
|
||||||
*/
|
*/
|
||||||
int sqliteKeywordCode(const WCHAR *z, int n){
|
static int sqliteKeywordCode(const WCHAR *z, int n){
|
||||||
UINT i, len;
|
UINT i, len;
|
||||||
char buffer[0x10];
|
char buffer[0x10];
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
#include "winbase.h"
|
#include "winbase.h"
|
||||||
#include "winerror.h"
|
#include "winerror.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "wine/unicode.h"
|
|
||||||
#include "msi.h"
|
#include "msi.h"
|
||||||
#include "msiquery.h"
|
#include "msiquery.h"
|
||||||
#include "objbase.h"
|
#include "objbase.h"
|
||||||
|
@ -171,7 +170,7 @@ static UINT STRCMP_Evaluate( string_table *st, MSIVIEW *table, UINT row,
|
||||||
else if( r_str && ! l_str )
|
else if( r_str && ! l_str )
|
||||||
sr = -1;
|
sr = -1;
|
||||||
else
|
else
|
||||||
sr = strcmpW( l_str, r_str );
|
sr = lstrcmpW( l_str, r_str );
|
||||||
|
|
||||||
*val = ( cond->u.expr.op == OP_EQ && ( sr == 0 ) ) ||
|
*val = ( cond->u.expr.op == OP_EQ && ( sr == 0 ) ) ||
|
||||||
( cond->u.expr.op == OP_LT && ( sr < 0 ) ) ||
|
( cond->u.expr.op == OP_LT && ( sr < 0 ) ) ||
|
||||||
|
|
Loading…
Reference in New Issue