ls_items[] is most definately not a set of pointers to const objects..

sysinits, for example, are sorted by swapping those objects(!).  Perhaps
they should be const and the sysinit sorting should be swapping the
pointers rather than the targets.  This is on my revisit list, but it
has the side effect of removing a lot of warnings.  With -Wcast-qual, it
doesn't seem easy to get rid of the constness when you *know* it's not.
(With apologies to bde, this essentially reverts rev 1.21 of kernel.h
 from back in 1996)
This commit is contained in:
Peter Wemm 1999-05-08 12:52:26 +00:00
parent cbed385da4
commit 05aec5db24

View file

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id$
* $Id: linker_set.h,v 1.1 1999/01/14 05:48:46 jdp Exp $
*/
#ifndef _SYS_LINKER_SET_H_
@ -81,8 +81,8 @@
#endif
struct linker_set {
int ls_length;
const void *ls_items[1]; /* really ls_length of them,
int ls_length;
void *ls_items[1]; /* really ls_length of them,
* trailing NULL */
};