Commit Graph

3 Commits

Author SHA1 Message Date
Antonio Borneo 26f2df80c3 helper: list: rename macro clashing with sys/queue.h
The macro named LIST_HEAD() clashed with a macro of same name in
the GNU libc file sys/queue.h.
This causes a warning in MacOS build due to some other system file
including sys/queue.h.

Rename LIST_HEAD() as OOCD_LIST_HEAD().

Checkpatch-ignore: MACRO_ARG_REUSE
Change-Id: Ic653edec77425a58251d64f56c9f5f6c645ba0cd
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reported-by: Andrew Shelley <ashelley@btinternet.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8683
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Andy <andrewjohnshelley@gmail.com>
2025-01-12 11:09:31 +00:00
Antonio Borneo 382148e4dd openocd: fix SPDX tag format for files .c
With the old checkpatch we cannot use the correct format for the
SPDX tags in the file .c, in fact the C99 comments are not allowed
and we had to use the block comment.

With the new checkpatch, let's switch to the correct SPDX format.

Change created automatically through the command:
	sed -i \
	's,^/\* *\(SPDX-License-Identifier: .*[^ ]\) *\*/$,// \1,' \
	$(find src/ contrib/ -name \*.c)

Change-Id: I6da16506baa7af718947562505dd49606d124171
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7153
Tested-by: jenkins
2022-09-18 08:22:01 +00:00
Andreas Fritiofson 6b94d29831 contrib: add an example of using list.h
Change-Id: Ic3d399d7ad2e4d10677cf78d64968040941b74e5
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/6280
Tested-by: jenkins
Reviewed-by: Tim Newsome <tim@sifive.com>
2021-06-04 17:41:48 +01:00