View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000446 | 1003.1(2008)/Issue 7 | Shell and Utilities | public | 2011-05-19 15:35 | 2013-04-16 13:06 |
Reporter | drepper | Assigned To | ajosey | ||
Priority | normal | Severity | Editorial | Type | Error |
Status | Closed | Resolution | Accepted As Marked | ||
Name | Ulrich Drepper | ||||
Organization | |||||
User Reference | ud-cksum | ||||
Section | cksum | ||||
Page Number | 2530 | ||||
Line Number | 81173 | ||||
Interp Status | --- | ||||
Final Accepted Text | See 0000446:0000788 | ||||
Summary | 0000446: incorrect variable type in example code | ||||
Description | I think at some point the parameters for the function provided in the cksum man page as an example implemented have been updated. But the local variables haven't. The variable i is supposed to iterate over a memory region. The upper limit is given in an size_t parameter but the variable is still unsigned int. | ||||
Desired Action | Replace line 81173 with register size_t i; register unsigned c, s = 0; | ||||
Tags | tc1-2008 |
|
As well as the n parameter changing to size_t, it looks like the b parameter was changed to add unsigned, but later lines do not reflect this. So in addition to the change in the Desired Action, I think we should also change: const char* b to: const unsigned char* b on line 81170 and change: c = (unsigned)(*b++); to: c = *b++; on line 81175. |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-05-19 15:35 | drepper | New Issue | |
2011-05-19 15:35 | drepper | Status | New => Under Review |
2011-05-19 15:35 | drepper | Assigned To | => ajosey |
2011-05-19 15:35 | drepper | Name | => Ulrich Drepper |
2011-05-19 15:35 | drepper | User Reference | => ud-cksum |
2011-05-19 15:35 | drepper | Section | => cksum |
2011-05-19 15:35 | drepper | Page Number | => 2530 |
2011-05-19 15:35 | drepper | Line Number | => 81173 |
2011-05-20 09:23 | geoffclare | Note Added: 0000788 | |
2011-06-09 15:44 | nick | Interp Status | => --- |
2011-06-09 15:44 | nick | Final Accepted Text | => See 0000446:0000788 |
2011-06-09 15:44 | nick | Status | Under Review => Resolution Proposed |
2011-06-09 15:44 | nick | Resolution | Open => Accepted As Marked |
2011-06-09 15:44 | nick | Tag Attached: tc1-2008 | |
2011-06-09 16:00 | geoffclare | Status | Resolution Proposed => Resolved |
2013-04-16 13:06 | ajosey | Status | Resolved => Closed |