Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] compilation warnings for unsigned char
- Date: Thu, 6 Jul 2006 18:52:05 +0200
- From: Botond Botyanszki <tlug@example.com>
- Subject: Re: [tlug] compilation warnings for unsigned char
- References: <200607060538.k665cUJR025051@example.com>
On Thu, 06 Jul 2006 15:38:30 +1000 (EST) Jim Breen <Jim.Breen@example.com> wrote: > >> > xjdserver.c:228: warning: pointer targets in passing argument 1 of > >> > 'strcpy' differ in signedness > >> > xjdserver.c:228: warning: pointer targets in passing argument 2 of > >> > 'strcpy' differ in signedness > >> > >> > Now in that case, both arguments are "unsigned char", so I assume > >> > the warning is because strcpy's prototype says it should be "char". > >> try: > >> > >> strcpy((char)foo1,(char)foo2); > Nah. That just gave me even more ugly warnings about converting pointers > and the like. What Jim meant was to cast your strings back to char *, he obviously forgot the pointer though. strcpy((char *)dst, (char *)src); Note that strcpy is evil though, better use strncpy/strlcpy.Attachment: signature.asc
Description: PGP signature
- References:
- Re: [tlug] compilation warnings for unsigned char
- From: Jim Breen
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Periodic Remote Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .(was Command Line is Good to Learn)
- Next by Date: Re: [tlug] Virtual Consoles . . . . . . . . . . . . . . . . . . . (wasRe: Baby Steps for Command Line)
- Previous by thread: Re: [tlug] compilation warnings for unsigned char
- Next by thread: Re: [tlug] compilation warnings for unsigned char
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links