Abe Timmerman wrote:
Op een mooie winterdag (Wednesday 15 February 2006 05:33),schreef Craig A.
Berry:
Thanks, applied as #27187.
Test-Drive (td180/ODS-5) isn't happy with it though:
CC/DECC/NOANSI_ALIAS /Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/
NoList/float=ieee/ieee=denorm/Define=PERL_CORE VMS.C
scnt = sscanf(inspec, "%2x%2x", outspec, &outspec[1]);
................................................^
%CC-W-INPTRTYPE, In this statement, this argument to sscanf is of "pointer to
char" type and is not appropriate for the conversion specifier "%2x". The
value may overwrite other data or produce unexpected results.
at line number 334 in file USER5:[abeltje.PERL-CURRENT]VMS.C;1
Apparently the optimizer does not realize that a %2x will always fit in
a char type on OpenVMS. In the non-optimized builds, the compiler does
not do this check, so I missed this.
According to the C manual, I have to extract the values into an unsigned
int. And then transfer the lower 8 bits into the char array.
So I will need to add some temporary variables.
And when it is all done, the compiler will still generate the same binary.
Unless you have unicode filenames, this code would not get exercised,
and if you do have unicode filenames, especially wide ones, I doubt that
the rest of Perl could handle them in UNIX format yet.
-John