From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2581 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: minor issues (found by cppcheck) Date: Mon, 14 Jan 2013 20:41:47 +0100 Message-ID: <20130114194147.GW4468@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1358192519 17726 80.91.229.3 (14 Jan 2013 19:41:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Jan 2013 19:41:59 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2582-gllmg-musl=m.gmane.org@lists.openwall.com Mon Jan 14 20:42:17 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1TupvD-00052V-Uh for gllmg-musl@plane.gmane.org; Mon, 14 Jan 2013 20:42:16 +0100 Original-Received: (qmail 10150 invoked by uid 550); 14 Jan 2013 19:41:59 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 10142 invoked from network); 14 Jan 2013 19:41:59 -0000 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2581 Archived-At: i fixed some minor issues in my repo which were found by cppcheck here is a list of the non-fixed ones: [src/misc/mntent.c:32]: (portability) scanf without field width limits can crash with huge input data getmntent_r has a sscanf with %d, it might make sense to limit the width [src/regex/regcomp.c:2032]: (performance) Variable 'status' is reassigned a value before the old one has been used. [src/regex/regcomp.c:3133]: (warning) Redundant assignment of 'errcode' to itself. [src/regex/regcomp.c:2060]: (style) Variable 'minimal_tag' is assigned a value that is never used. [src/regex/regcomp.c:108]: (style) struct or union member 'Anonymous1::params' is never used. [src/regex/regcomp.c:2803]: (error) Uninitialized variable: params some of these occure multiple times, the last two is probably worth fixing: u.params in tre_literal_t struct is never used and in the tre_match_empty function the params argument is never used, but an uninitialized pointer is passed anyway [src/locale/strfmon.c:33]: (style) Variable 'fill' is assigned a value that is never used. [src/stdio/vfscanf.c:134]: (style) Variable 'alloc' is assigned a value that is never used. [src/stdio/vfwscanf.c:144]: (style) Variable 'alloc' is assigned a value that is never used. these are examples of unused values but they all seem to be innocent