[OCLUG-devel] pointer from integer without a cast

Doug Jolley ddjolley at gmail.com
Tue Sep 13 09:31:43 PDT 2005


I've been playing around trying to get crypt to work. I have a little test 
program that I'm using which I am appending to this message. When I try to 
compile the test program I get a compiler warning that the assignment makes 
a pointer from an integer without a cast. I actually think I understand the 
thrust of what that message is trying to tell me. The problem is that I 
don't think I'm doing what it's complaining about. My understanding is that 
the crypt function returns a pointer to charactger. If that's the case; 
then, I'm assigning a pointer to a pointer and I don't understand the 
complaint. Any ideas on what I'm missing?

Thanks for any input.

... doug
- - - - - - - - - - - - - - - - - Test Program - - - - - - - - - - - - - - -
#include <stdio.h>
#include <unistd.h>
int main() {
char *p2epw;
p2epw=crypt("blackjack","00");
printf("Encrypted PW: %s\n",p2epw);
return 0;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://localhost.localdomain/pipermail/oclug-devel/attachments/20050913/6308c12e/attachment.html 


More information about the OCLUG-devel mailing list