Hi Ernst, this seems to be a SDCC bug. Please report it on the SDCC Bug tracker on SourceForge and supply all the information needed to reproduce it, including the nut_io.h header file.
Borut Maarten Brock wrote: > My guess is that the line is correct but the filename is > not. Have a look in the included header files and search > for an assignment of a literal value (<128) to such a > pointer. > > > >> Hi! >> >> I am trying to port software from AVR-GCC to Z80-SDCC 2.7.0. >> SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 >> 2.7.0 #4818 (May 31 2007) (MINGW32) >> >> On a number of source files, I receive the error message: (for example:) >> >> ../.././nut/crt/write.c:92: warning 154: converting integral to pointer >> without a cast >> from type 'literal-char' >> to type 'struct _NUTFILE generic* ' >> >> The "problem" is that "write.c" has only 41 lines. So "write.c:92" points >> "somewhere". >> >> Interestingly, ALL warning 154 messages show the "92" as line number when >> the "to" type is 'struct _NUTFILE generic* ' and show the line number 121 >> when the to type is 'void generic* '. >> >> The source of write.c is: >> >> --start-- >> >> >> #include "nut_io.h" >> >> #include <sys/device.h> >> >> /*! >> * \addtogroup xgCrtLowio >> */ >> /[EMAIL PROTECTED]/ >> >> /*! >> * \brief Write data to a file, device or socket. >> * >> * \param fd Descriptor of a previously opened file, device or >> * connected socket. >> * \param data Pointer to data in program space to be written. >> * \param count Number of bytes to write. >> * >> * \return The number of bytes written, which may be less than the number >> * of bytes specified. A return value of -1 indicates an error. >> * >> * \note The write implementation of the underlying driver does not need >> * to be thread-safe. Parallel writes using device usartavr will >> * lead to intermixed data (if data doesn't fit into ringbuffer >> * on the first try ) >> */ >> int _write(int fd, CONST void *data, unsigned int count) >> { >> NUTFILE *fp = (NUTFILE *) ((uptr_t) fd); >> NUTDEVICE *dev = fp->nf_dev; >> >> if (dev == 0) { >> NUTVIRTUALDEVICE *vdv = (NUTVIRTUALDEVICE *) fp; >> return (*vdv->vdv_write) (vdv, data, count); >> } >> return (*dev->dev_write) (fp, data, count); >> } >> >> /[EMAIL PROTECTED]/ >> --end-- >> >> SDCC is invoked by: >> >> sdcc -c 2>>d:\pjrc\sdccout.txt -mz80 --stack-auto -DZ80_SBC180 >> -I../.././nutbld/include -I../.././nut/include ../.././nut/crt/write.c -o >> write.o >> >> >> I also tried a newer SDCC version: >> D:\pjrc>sdcc --version >> SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 >> 2.7.4 #5000 (Jan 25 2008) (MINGW32) >> >> because I found a email dated 2007-02-12 20:18 in the archive stating a bug >> (which may be this one, I thought) is fixed by SVN 4631. >> >> Has anybody come across this situation? How may I go forward to find what >> causes that message? >> >> Regards >> Ernst >> ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user