apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Fester" <afes...@apache.org>
Subject Re: Compile Error on 64Bit Machine
Date Thu, 29 Jun 2006 09:13:55 GMT
Hi Christian,

first, its usually a good idea to post a complete example
with a small main() function, this makes it easier
to simply cut&paste it it into an editor and run it
through the compiler to verify the issue.

Then, I suppose that your issue does not have to do
anything with 64 bit. You are passing a *character*
to the third parameter:

apr_snprintf(b, MAX_STRING_LEN, 'BASIC %s', uu);

Instead try

apr_snprintf(b, MAX_STRING_LEN, "BASIC %s", uu);

Best Regards,

	Andreas

Christian Klinger wrote:
[...]
> here is a example of my code:
> (uu is base64 encoded username:passwort)
> -------------
> char b[MAX_STRING_LEN]
> ...
> apr_snprintf(b, MAX_STRING_LEN, 'BASIC %s', uu);
> ----------------
> 
> if i compile this i got these errors:
> 
> mod_auth_tkt.c:1308:35: warning: character constant too long for its type
> mod_auth_tkt.c: In function ‘auth_tkt_check’:
> mod_auth_tkt.c:1308: warning: passing argument 3 of ‘apr_snprintf’ makes
> pointer from integer without a cast



Mime
View raw message