From 8ea4b5b5b10e5b68a79ab651820dcbc4c4d88207 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Tue, 11 Feb 2020 15:46:46 +0100 Subject: Fix static analyzer errors and warnings Fix several bugs found by scan-build (more to come). https://clang-analyzer.llvm.org/scan-build.html See also current travis-ci build log with static analyzer, e.g. https://travis-ci.com/fltk/fltk/jobs/285426415 (link may become invalid in the future). --- src/Fl_Preferences.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Fl_Preferences.cxx') diff --git a/src/Fl_Preferences.cxx b/src/Fl_Preferences.cxx index a9b4464bf..31ea72ea5 100644 --- a/src/Fl_Preferences.cxx +++ b/src/Fl_Preferences.cxx @@ -1476,7 +1476,7 @@ void Fl_Preferences::Node::createIndex() { int n = nChildren(); if (n>NIndex_) { NIndex_ = n + 16; - index_ = (Node**)realloc(index_, NIndex_*sizeof(Node**)); + index_ = (Node**)realloc(index_, NIndex_*sizeof(Node*)); } Node *nd; int i = 0; -- cgit v1.2.3