[rtems commit] timecounter: Merge FreeBSD change r304285

Sebastian Huber sebh at rtems.org
Thu Oct 12 05:07:25 UTC 2017


Module:    rtems
Branch:    master
Commit:    2b6d00f533f71027a5b076d0cbd50847640c8ec2
Changeset: http://git.rtems.org/rtems/commit/?id=2b6d00f533f71027a5b076d0cbd50847640c8ec2

Author:    Ian Lepore <ian at FreeBSD.org>
Date:      Thu Aug 13 14:43:25 2015 +0000

timecounter: Merge FreeBSD change r304285

Constify the pointers to eventtimer and timecounter name strings.

The need for this appears as soon as you try to set the names to something
that isn't a "quoted literal".  (I'm actually confused why quoted strings
aren't a problem as well, we must have some warning disabled.)

Update #3175.

---

 cpukit/score/include/sys/timetc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/score/include/sys/timetc.h b/cpukit/score/include/sys/timetc.h
index 88e90de..73e63f7 100644
--- a/cpukit/score/include/sys/timetc.h
+++ b/cpukit/score/include/sys/timetc.h
@@ -51,7 +51,7 @@ struct timecounter {
 		/* This mask should mask off any unimplemented bits. */
 	uint64_t		tc_frequency;
 		/* Frequency of the counter in Hz. */
-	char			*tc_name;
+	const char		*tc_name;
 		/* Name of the timecounter. */
 	int			tc_quality;
 		/*



More information about the vc mailing list