Zeitpunkt Nutzer Delta Tröts TNR Titel Version maxTL Sa 20.07.2024 00:00:00 51.627 +15 2.202.571 42,7 Vivaldi Social 4.2.10 1.337 Fr 19.07.2024 13:57:34 51.612 +74 2.201.079 42,6 Vivaldi Social 4.2.10 1.337 Do 18.07.2024 00:02:08 51.538 +37 2.196.543 42,6 Vivaldi Social 4.2.10 1.337 Mi 17.07.2024 00:02:01 51.501 +40 2.193.235 42,6 Vivaldi Social 4.2.10 1.337 Di 16.07.2024 00:01:34 51.461 +50 2.190.243 42,6 Vivaldi Social 4.2.10 1.337 Mo 15.07.2024 00:01:57 51.411 +38 2.187.141 42,5 Vivaldi Social 4.2.10 1.337 So 14.07.2024 00:00:17 51.373 +38 2.183.921 42,5 Vivaldi Social 4.2.10 1.337 Sa 13.07.2024 00:00:07 51.335 +38 2.182.997 42,5 Vivaldi Social 4.2.10 1.337 Fr 12.07.2024 01:48:55 51.297 +35 2.180.581 42,5 Vivaldi Social 4.2.10 1.337 Do 11.07.2024 00:00:47 51.262 0 2.185.421 42,6 Vivaldi Social 4.2.10 1.337
thradams (@thradams) · 11/2022 · Tröts: 572 · Folger: 12
Sa 20.07.2024 22:46
Compiler complains that I am checking p_not_null_member.
void f(struct X *p){
if (p->p_not_null_member) {...}
}
The compiler is correct and checking this at compile time for me.
But I want to be extra cautious and check this in runtime as well.
Using assert(p->p_not_null_member) will not make the warning go away. It makes things worse because I am using assert to override the compiler's information.
I think "diagnostic check" can be used here.
void f(struct X *p){
if (p->p_not_null_member) {
#pragma cake diagnostic check "always-not-null"
...
}
}
I agree with the compiler and am dismissing the warning. I don't want to override the compiler's conclusions; they are correct.
If any contract changes the "diagnostic check " fails.
I think the power of override compiler checks can be necessary sometimes but also dangerous.
The "diagnostic check" is safer.
[Öffentlich] Antw.: 0 Wtrl.: 0 Fav.: 0 · via Web