mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:19:49 +00:00
mshtml: Avoid signed-unsigned integer comparisons.
This commit is contained in:
parent
40f3a9fa59
commit
a9200aa99d
4 changed files with 12 additions and 8 deletions
|
@ -127,7 +127,8 @@ static int loose_hex_to_rgb(const WCHAR *hex)
|
|||
|
||||
static HRESULT nscolor_to_str(LPCWSTR color, BSTR *ret)
|
||||
{
|
||||
int i, rgb = -1;
|
||||
unsigned int i;
|
||||
int rgb = -1;
|
||||
|
||||
static const WCHAR formatW[] = {'#','%','0','2','x','%','0','2','x','%','0','2','x',0};
|
||||
|
||||
|
|
|
@ -929,7 +929,6 @@ static void call_event_handlers(HTMLDocumentNode *doc, HTMLEventObj *event_obj,
|
|||
const BOOL cancelable = event_info[eid].flags & EVENT_CANCELABLE;
|
||||
handler_vector_t *handler_vector = NULL;
|
||||
VARIANT v;
|
||||
int i;
|
||||
HRESULT hres;
|
||||
|
||||
if(event_target)
|
||||
|
@ -966,6 +965,7 @@ static void call_event_handlers(HTMLDocumentNode *doc, HTMLEventObj *event_obj,
|
|||
if(handler_vector && handler_vector->handler_cnt) {
|
||||
VARIANTARG arg;
|
||||
DISPPARAMS dp = {&arg, NULL, 1, 0};
|
||||
int i;
|
||||
|
||||
V_VT(&arg) = VT_DISPATCH;
|
||||
V_DISPATCH(&arg) = (IDispatch*)event_obj;
|
||||
|
@ -1009,16 +1009,18 @@ static void call_event_handlers(HTMLDocumentNode *doc, HTMLEventObj *event_obj,
|
|||
|
||||
for(cp = cp_container->cp_list; cp; cp = cp->next) {
|
||||
if(cp->sinks_size && is_cp_event(cp->data, event_info[eid].dispid)) {
|
||||
unsigned int i;
|
||||
|
||||
for(i=0; doc->nsevent_listener && i < cp->sinks_size; i++) {
|
||||
if(!cp->sinks[i].disp)
|
||||
continue;
|
||||
|
||||
V_VT(&v) = VT_EMPTY;
|
||||
|
||||
TRACE("cp %s [%d] >>>\n", debugstr_w(event_info[eid].name), i);
|
||||
TRACE("cp %s [%u] >>>\n", debugstr_w(event_info[eid].name), i);
|
||||
hres = call_cp_func(cp->sinks[i].disp, event_info[eid].dispid, &v);
|
||||
if(hres == S_OK) {
|
||||
TRACE("cp %s [%d] <<<\n", debugstr_w(event_info[eid].name), i);
|
||||
TRACE("cp %s [%u] <<<\n", debugstr_w(event_info[eid].name), i);
|
||||
|
||||
if(cancelable) {
|
||||
if(V_VT(&v) == VT_BOOL) {
|
||||
|
@ -1030,7 +1032,7 @@ static void call_event_handlers(HTMLDocumentNode *doc, HTMLEventObj *event_obj,
|
|||
}
|
||||
VariantClear(&v);
|
||||
}else {
|
||||
WARN("cp %s [%d] <<< %08x\n", debugstr_w(event_info[eid].name), i, hres);
|
||||
WARN("cp %s [%u] <<< %08x\n", debugstr_w(event_info[eid].name), i, hres);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1558,7 +1560,8 @@ HRESULT doc_init_events(HTMLDocumentNode *doc)
|
|||
|
||||
void release_event_target(event_target_t *event_target)
|
||||
{
|
||||
int i, j;
|
||||
int i;
|
||||
unsigned int j;
|
||||
|
||||
for(i=0; i < EVENTID_LAST; i++) {
|
||||
if(event_target->event_table[i]) {
|
||||
|
|
|
@ -67,7 +67,7 @@ static void thread_detach(void)
|
|||
|
||||
static void free_strings(void)
|
||||
{
|
||||
int i;
|
||||
unsigned int i;
|
||||
for(i = 0; i < sizeof(status_strings)/sizeof(*status_strings); i++)
|
||||
heap_free(status_strings[i]);
|
||||
}
|
||||
|
|
|
@ -3229,7 +3229,7 @@ static nsresult NSAPI nsIOService_GetProtocolFlags(nsIIOService *iface, const ch
|
|||
static BOOL is_gecko_special_uri(const char *spec)
|
||||
{
|
||||
static const char *special_schemes[] = {"chrome:", "jar:", "moz-safe-about", "resource:", "javascript:", "wyciwyg:"};
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
for(i=0; i < sizeof(special_schemes)/sizeof(*special_schemes); i++) {
|
||||
if(!strncasecmp(spec, special_schemes[i], strlen(special_schemes[i])))
|
||||
|
|
Loading…
Reference in a new issue