From owner-freebsd-java Sat Apr 8 15:15:34 2000 Delivered-To: freebsd-java@freebsd.org Received: from mail.telekabel.nl (arnhem.telekabel.nl [194.134.132.130]) by hub.freebsd.org (Postfix) with ESMTP id B8D4E37B59C for ; Sat, 8 Apr 2000 15:15:27 -0700 (PDT) (envelope-from ernst@jollem.com) Received: from jollem.com (c187104187.telekabel.chello.nl [212.187.104.187]) by mail.telekabel.nl (8.8.8/8.8/EuroNet) with ESMTP id AAA18556; Sun, 9 Apr 2000 00:15:25 +0200 (MET DST) Message-ID: <38EFAF7E.2C47B3FE@jollem.com> Date: Sun, 09 Apr 2000 00:15:26 +0200 From: Ernst de Haan Organization: Jollem X-Mailer: Mozilla 4.72 [en] (X11; I; FreeBSD 3.4-STABLE i386) X-Accept-Language: en, nl MIME-Version: 1.0 To: freebsd-java@freebsd.org Subject: Analysis of compile warnings/errors (patchset 4) Content-Type: multipart/mixed; boundary="------------1F290E75CF7BE1DF2F955E29" Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org This is a multi-part message in MIME format. --------------1F290E75CF7BE1DF2F955E29 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, On advise of Kees-Jan (thanx m8!) I analysed the output the compile process sent to stderr. I've written a script that does the analysis by counting the number of occurences of certain messages. Both the script and the results for patchset 4 are attached. This script can also be used to alalyze future patchsets. This should give us an idea of what kind of lexical errors and warnings our port still has. If you want to execute the script (filter-compile-errors), then you should first change the filename setting in the script to reflect the location of file that contains the stderr output. PS: Perhaps using lint to catch some common (and less common) mistakes is a good idea. Ernst -- Ernst de Haan Freelance Java Architect "Come to me all who are weary and burdened, and I will give you rest" -- Jesus Christ --------------1F290E75CF7BE1DF2F955E29 Content-Type: text/plain; charset=us-ascii; name="jdk12-compile-err-analysis" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="jdk12-compile-err-analysis" bash-2.03$ ./filter-compile-errors >> Using temporary file /tmp/dm5247 >> Copying `/home/ernst/private/research-jdk12compile-errors/jdk12compile.err' to `remains' >> Removing lines "In function"... [ DONE ] >> Removing lines "^1 warning$"... [ DONE ] >> Removing lines "^ from .*\..*:[0-9]*[,:]$"... [ DONE ] >> Removing lines "In file included from"... [ DONE ] >> Removing lines "^\[Parsed DTD .* in [0-9]*ms\]$"... [ DONE ] >> Removing lines "Warning: JIT compiler ".*" not found\. Will use interpreter\."... [ DONE ] >> Removing lines "this is the location of the previous definition"... [ DONE ] >> Removing lines "Error.* (ignored)$"... [ DONE ] >> Removing lines "files use or override a deprecated API"... [ DONE ] >> Removing lines "At top level"... [ DONE ] >> Searching for "comparison between signed and unsigned"... [ 475 ] >> Searching for "left shift count >= width of type"... [ 54 ] >> Searching for "no previous prototype for"... [ 204 ] >> Searching for "nested extern declaration of"... [ 26 ] >> Searching for "warning: `.*' redefined"... [ 4 ] >> Searching for "implicit declaration of"... [ 10 ] >> Searching for "long int format"... [ 2 ] >> Searching for "this file includes which is deprecated"... [ 14 ] >> Searching for "cast to pointer from integer of different size"... [ 2 ] >> Searching for "cast from pointer to integer of different size"... [ 4 ] >> Searching for "unsigned value >= 0 is always 1"... [ 4 ] >> Searching for "warning: assignment makes pointer from integer without a cast"... [ 12 ] >> Searching for "was used with no prototype before its definition"... [ 6 ] >> Searching for "might be used uninitialized in this function"... [ 1 ] >> Searching for "passing arg [0-9]* of `.*' makes integer from pointer without a cast"... [ 2 ] >> Searching for "java uses or overrides a deprecated API"... [ 10 ] >> Searching for "^cd: can't cd to "... [ 2 ] >> Searching for "[Nn]o such file or directory"... [ 30 ] >> Searching for "Note: Method .*(.*) in class .* does not override"... [ 1 ] bash-2.03$ --------------1F290E75CF7BE1DF2F955E29 Content-Type: text/plain; charset=us-ascii; name="filter-compile-errors" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="filter-compile-errors" #!/bin/sh # # $Id$ # # # # # Version: $Revision$ $Date$ # Authors: Ernst de Haan # # The file that contains the stderr output from the compile process # Change this to the name of the file on your system file=${HOME}/private/research-jdk12compile-errors/jdk12compile.err step=0 tempfile=`mktemp /tmp/XXXXXX` remainfile=remains find-msg() { local num=0 local nextstep=0 nextstep=$((${step}+1)) echo -n ">> Searching for \"${re}\"..." num=`grep -c "${re}" ${remainfile}` echo " [ ${num} ]" grep -v "${re}" ${remainfile} > ${tempfile} cp ${tempfile} ${remainfile} } remove-lines() { echo -n ">> Removing lines \"${re}\"..." echo " [ DONE ]" grep -v "${re}" ${remainfile} > ${tempfile} cp ${tempfile} ${remainfile} } echo ">> Using temporary file ${tempfile}" echo ">> Copying \`${file}' to \`${remainfile}'" cp ${file} ${remainfile} re="In function" remove-lines re="^1 warning$" remove-lines re="^ from .*\..*:[0-9]*[,:]$" remove-lines re="In file included from" remove-lines re="^\[Parsed DTD .* in [0-9]*ms\]$" remove-lines re="Warning: JIT compiler \".*\" not found\. Will use interpreter\." remove-lines re="this is the location of the previous definition" remove-lines re="Error.* (ignored)$" remove-lines re="files use or override a deprecated API" remove-lines re="At top level" remove-lines re="comparison between signed and unsigned" find-msg re="left shift count >= width of type" find-msg re="no previous prototype for" find-msg re="nested extern declaration of" find-msg re="warning: \`.*' redefined" find-msg re="implicit declaration of" find-msg re="long int format" find-msg re="this file includes which is deprecated" find-msg re="cast to pointer from integer of different size" find-msg re="cast from pointer to integer of different size" find-msg re="unsigned value >= 0 is always 1" find-msg re="warning: assignment makes pointer from integer without a cast" find-msg re="was used with no prototype before its definition" find-msg re="might be used uninitialized in this function" find-msg re="passing arg [0-9]* of \`.*' makes integer from pointer without a cast" find-msg re="java uses or overrides a deprecated API" find-msg re="^cd: can't cd to " find-msg re="[Nn]o such file or directory" find-msg re="Note: Method .*(.*) in class .* does not override" find-msg rm ${tempfile} unset find-msg unset re unset tempfile unset remainfile --------------1F290E75CF7BE1DF2F955E29 Content-Type: text/x-vcard; charset=us-ascii; name="ernst.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Ernst de Haan Content-Disposition: attachment; filename="ernst.vcf" begin:vcard n:de Haan;Ernst tel;fax:+31 (0)26 3645634 tel;work:+31 (0)26 3623895 x-mozilla-html:FALSE url:http://www.znerd.demon.nl/ org:Jollem adr:;;Rozendaalselaan 35;Velp;GLD;6881 KZ;Netherlands version:2.1 email;internet:ernst@jollem.com title:Java Architect fn:Ernst de Haan end:vcard --------------1F290E75CF7BE1DF2F955E29-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message