Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern clang does not like to deref a null pointer unless ...
details: https://anonhg.NetBSD.org/src/rev/2334e6270910
branches: trunk
changeset: 447479:2334e6270910
user: tnn <tnn%NetBSD.org@localhost>
date: Sun Jan 13 00:11:29 2019 +0000
description:
clang does not like to deref a null pointer unless it is qualified volatile
diffstat:
sys/kern/kern_crashme.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (17 lines):
diff -r 3d016a5d8f4e -r 2334e6270910 sys/kern/kern_crashme.c
--- a/sys/kern/kern_crashme.c Sat Jan 12 22:14:08 2019 +0000
+++ b/sys/kern/kern_crashme.c Sun Jan 13 00:11:29 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_crashme.c,v 1.1 2019/01/09 04:01:20 mrg Exp $ */
+/* $NetBSD: kern_crashme.c,v 1.2 2019/01/13 00:11:29 tnn Exp $ */
/*
* Copyright (c) 2018, 2019 Matthew R. Green
@@ -231,6 +231,6 @@
crashme_null_deref(int flags)
{
- *(char *)0 = 0;
+ *(volatile char *)0 = 0;
return -1;
}
Home |
Main Index |
Thread Index |
Old Index