All of lore.kernel.org
 help / color / mirror / Atom feed
* MISRA: Compatible declarations for sort and bsearch
@ 2023-11-24  9:40 Nicola Vetrini
  2023-11-27 14:32 ` Nicola Vetrini
  2023-11-28  8:56 ` Jan Beulich
  0 siblings, 2 replies; 9+ messages in thread
From: Nicola Vetrini @ 2023-11-24  9:40 UTC (permalink / raw)
  To: Xen Devel
  Cc: Stefano Stabellini, Jbeulich, Andrew Cooper3, Julien Grall,
	George Dunlap, Wei Liu

Hi all,

in xen/lib.h and xen/sort.h there are definitions of the functions 
bsearch and sort that have no prior declarations, and therefore are 
subject to a violation of MISRA C Rule 8.4.

I'm wondering whether it would be preferred

1. to put a declaration just before the definition, in lib.h and sort.h
2. deviate these functions, as their signatures are well-known and 
somewhat standardized

other resolution strategies are possible, but I think these are the main 
ones.

-- 
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-11-29  9:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-24  9:40 MISRA: Compatible declarations for sort and bsearch Nicola Vetrini
2023-11-27 14:32 ` Nicola Vetrini
2023-11-27 14:59   ` Jan Beulich
2023-11-27 17:57     ` Nicola Vetrini
2023-11-28  8:54       ` Jan Beulich
2023-11-29  3:26       ` Stefano Stabellini
2023-11-29  9:07         ` Nicola Vetrini
2023-11-28  8:56 ` Jan Beulich
2023-11-28 11:17   ` Nicola Vetrini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.