Clarify the argument count warning
Francois Gouget
fgouget at free.fr
Thu Oct 21 09:07:33 CDT 2004
Running winapi_check yields some warnings such as:
dlls/dbghelp/symbol.c:763: dbghelp: BOOL WINAPI
SymEnumSymbols(HANDLE,ULONG64,PCSTR,PSYM_ENUMERATESYMBOLS_CALLBACK,PVOID):
argument count differs: 5 != 5
This could look like a winap_check bug. But in fact what happens is that
this function takes a 64 bit parameter which must be declared as "long
long" in the spec file but was not and which gave the above error.
So the patch below tweaks that code to make the warning a little bit
clearer. Oh, and I'm also sending a separate patch to fix the
SymEnumSymbols issue.
(IMHO would be better to have a longlong type in the spec file (and
maybe a long_ptr one too) but that's an issue for someone else and
another day)
Changelog:
* tools/winapi_check/winapi_local.pm
Make the 'wrong argument count' warning clearer when dealing with
long vs. "long long" issues.
--
Francois Gouget fgouget at free.fr http://fgouget.free.fr/
I haven't lost my mind, it's backed up on tape around here somewhere...
-------------- next part --------------
Index: tools/winapi_check/winapi_local.pm
===================================================================
RCS file: /var/cvs/wine/tools/winapi_check/winapi_local.pm,v
retrieving revision 1.39
diff -u -r1.39 winapi_local.pm
--- tools/winapi_check/winapi_local.pm 7 Oct 2004 18:53:56 -0000 1.39
+++ tools/winapi_check/winapi_local.pm 21 Oct 2004 10:34:26 -0000
@@ -272,20 +272,27 @@
}
}
- if($#argument_kinds != $#declared_argument_kinds &&
- $implemented_calling_convention ne "asm")
+ if ($options->argument_count &&
+ $implemented_calling_convention ne "asm")
{
- if($options->argument_count) {
+ if ($#argument_kinds != $#declared_argument_kinds and
+ $#argument_types != $#declared_argument_kinds) {
$output->write("argument count differs: " .
- ($#argument_types + 1) . " != " .
+ ($#argument_kinds + 1) . " != " .
($#declared_argument_kinds + 1) . "\n");
+ } elsif ($#argument_kinds != $#declared_argument_kinds or
+ $#argument_types != $#declared_argument_kinds) {
+ $output->write("argument count differs: " .
+ ($#argument_kinds + 1) . "/" . ($#argument_types + 1) .
+ " != " . ($#declared_argument_kinds + 1) .
+ " (long vs. long long problem?)\n");
}
}
}
if($segmented && $options->shared_segmented && $winapi->is_shared_internal_function($internal_name)) {
- $output->write("function using segmented pointers shared between Win16 och Win32\n");
+ $output->write("function using segmented pointers shared between Win16 and Win32\n");
}
}
More information about the wine-patches
mailing list