From: d b. <dc...@ho...> - 2005-07-25 11:14:10
|
Hello there, I just tried to compile Redhat Fedora package netatalk-2.0.3-2 with the Intel C compiler version 8.1 with compiler flag -Wall switched on. The compiler said 1. asingle.c(236): warning #175: subscript out of range asingle.c(237): warning #175: subscript out of range The source code is fh->finder_xinfo.fdScript = *(entry_buf + FINDERIOFF_SCRIPT); fh->finder_xinfo.fdXFlags = *(entry_buf + FINDERIOFF_XFLAGS); Broken code ? entry_buf only has sixteen elements, but FINDERIOFF_SCRIPT has the value 24, and FINDERIOFF_XFLAGS has the value 25. Suggest code rework. I'm not sure what the fix is for this. 2. asingle.c(313): warning #175: subscript out of range asingle.c(315): warning #175: subscript out of range The source code is if ( single.entry[ ADEID_RFORK ].ade_off == 0 ) { fh->forklen[ ADEID_RFORK ] = 0; } else { fh->forklen[ ADEID_RFORK ] = htonl( single.entry[ ADEID_RFORK ].ade_len ); } but array forklen has only two elements and ADEID_RFORK has the value two. Array limits in C are exclusive, so fh->forklen[ 2] doesn't exist. Suggest code rework. I'm not sure what the fix is for this. Regards David Binderman _________________________________________________________________ It's fast, it's easy and it's free. Get MSN Messenger 7.0 today! http://messenger.msn.co.uk |