projects
/
platform
/
upstream
/
libgc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b7bce91
)
Revert "Workaround 'suspicious ptr subtraction' cppcheck warning in gc_cpp"
author
Ivan Maidanski
<ivmai@mail.ru>
Tue, 25 Oct 2016 22:07:33 +0000
(
01:07
+0300)
committer
Ivan Maidanski
<ivmai@mail.ru>
Tue, 25 Oct 2016 22:07:33 +0000
(
01:07
+0300)
This reverts commit
363890b2ab8365dcc6b87a2a6c4752c1f710dcf2
.
Because the warning is still reported by the recent versions of
cppcheck (as of Oct 2016).
include/gc_cpp.h
patch
|
blob
|
history
diff --git
a/include/gc_cpp.h
b/include/gc_cpp.h
index
8c9d054
..
b0ab260
100644
(file)
--- a/
include/gc_cpp.h
+++ b/
include/gc_cpp.h
@@
-432,7
+432,7
@@
inline gc_cleanup::gc_cleanup()
if (base != 0) {
// Don't call the debug version, since this is a real base address.
GC_register_finalizer_ignore_self(base, (GC_finalization_proc) cleanup,
- (void*) ((
(char*) this)
- (char*) base),
+ (void*) ((
char*) this
- (char*) base),
&oldProc, &oldData);
if (oldProc != 0) {
GC_register_finalizer_ignore_self(base, oldProc, oldData, 0, 0);