Jim Meyering wrote: > Hello, > > [in corosync] > Looking at a "const" cast-away warning related to an API issue, > I wondered if cfg.c (corosync_cfg_state_track)'s notification_buffer > parameter should *not* be "const", but do not see any use of that > member, so can't be sure. No use in cluster or openais either. > And no documentation to give a clue. > > Steven said he suspected it's a dead interface, > and http://www.google.com/codesearch?q=corosync_cfg_state_track > says no one is using it, but that also shows that this search tool > doesn't yet index corosync, so I'll ask the list: > > Does anyone know of code that uses this function, or that might > want to some day? If so, should the notification_buffer be const or > not?
cfg_state_track is most certainly not dead! It's used by the cluster code in master for shutdowns as it replaces cman's shutdown code. Just because nothing in the corosync tree uses a function doesn't mean it is "dead". What if we decide to add a function that would be useful to other people (say a get into type call) that doesn't get used for a few months because nobody got round it it or, horror of horrors, it wasn't included in a stable release yet! Do we delete it again? Anyway you get the point. As to whether the buffer should be const or not ... well, the buffer itself is not currently used so it doesn't matter either way ;-) I imagine that some of the intended features of cfg (the ones I haven't touched and don't intend to unless under duress) would use it for storage though. Which means it probably should not be const. Chrissie _______________________________________________ Openais mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/openais
