[PATCH] Shut up valgrind
François Revol <[email protected]> Tue, 21 Jan 2014 22:33:56 +0100
| Newsgroups | gmane.editors.qemacs.devel |
|---|---|
| Message-ID | <[email protected]> |
This shuts up valgrind which seems to think QEFont::refcount isn't initialized (while in theory qe_mallocz() sets it to 0 but well... ==29937== Conditional jump or move depends on uninitialised value(s) ==29937== at 0x40ECC1: print_at_byte (display.h:259) ==29937== by 0x40F111: put_status (qe.c:4521) ==29937== by 0x415E2A: qe_init (qe.c:7987) ==29937== by 0x41F66E: url_main_loop (unix.c:305) ==29937== by 0x409028: main (qe.c:8040) ==29937== ==29937== Conditional jump or move depends on uninitialised value(s) ==29937== at 0x40C213: get_line_height (display.h:259) ==29937== by 0x4134E5: do_refresh (qe.c:6472) ==29937== by 0x415E37: qe_init (qe.c:7992) ==29937== by 0x41F66E: url_main_loop (unix.c:305) ==29937== by 0x409028: main (qe.c:8040) ==29937== François. _______________________________________________ Qemacs-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/qemacs-devel
display-valgrind-001.patch
(text/x-patch, 417 B)
Index: display.c
===================================================================
RCS file: /sources/qemacs/qemacs/display.c,v
retrieving revision 1.14
diff -u -r1.14 display.c
--- display.c 8 Apr 2008 06:55:44 -0000 1.14
+++ display.c 21 Jan 2014 21:27:57 -0000
@@ -290,6 +290,7 @@
goto fail;
}
+ fc->refcount = 0;
fc->style = style;
fc->size = size;
font_cache[min_index] = fc;