Bug 110899
| Summary: | bad source code | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | d.binderman |
| Component: | netatalk | Assignee: | Charlie Bennett <ccb> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 1 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | FC2 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2004-07-26 20:49:53 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
FC2 and later have netatalk updated to 1.6.4. Have you tried building this rev against FC1? I can confirm that the "subscript out of range" warning messages still occur in Fedora Core 3 Test 3. That's almost a year those warnings have been produced, without a fix available in Fedora. |
Description of problem: I just tried to compile package netatalk-1_5_5-9 from Fedora. The compiler said 1. ad_lock.c(269): warning #187: use of "=" where "==" may have been intended The source code is if ((lock.l_type = F_RDLCK) && Maybe better would be if ((lock.l_type == F_RDLCK) && 2. asingle.c(242): warning #175: subscript out of range asingle.c(243): warning #175: subscript out of range The source code is #define FINDERIOFF_SCRIPT 24 #define FINDERIOFF_XFLAGS 25 u_char entry_buf[ 16 ]; fh->finder_xinfo.fdScript = *(entry_buf + FINDERIOFF_SCRIPT); fh->finder_xinfo.fdXFlags = *(entry_buf + FINDERIOFF_XFLAGS); Maybe entry_buf should be bigger. 3. asingle.c(319): warning #175: subscript out of range asingle.c(321): warning #175: subscript out of range The source code is #define ADEID_RFORK 2 #define NUMFORKS 2 /* forklen[ NUM_FORKS] */ 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 ); } 4. megatron.c(217): warning #165: too few arguments in function call The source code is int from_open( un, file, fh, flags ) int un, flags; char *file; struct FHeader *fh; { /* ... */ } if ( from_open( module, path, &fh ) < 0 ) { I strongly recommend use of function prototypes, from ISO C. K & R style function declarations have been deprecated for about fifteen years now. Version-Release number of selected component (if applicable): netatalk-1_5_5-9 How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: