From owner-freebsd-java Tue May 2 1:57:15 2000 Delivered-To: freebsd-java@freebsd.org Received: from relay01.chello.nl (smtp.chello.nl [212.83.68.144]) by hub.freebsd.org (Postfix) with ESMTP id E98AD37BA6C for ; Tue, 2 May 2000 01:56:58 -0700 (PDT) (envelope-from ernst@jollem.com) Received: from jollem.com ([212.187.104.187]) by relay01.chello.nl (InterMail vK.4.02.00.00 201-232-116 license 199f3c0039bf924253955fca0afeedcc) with ESMTP id <20000502085330.XLCN16343.relay01@jollem.com>; Tue, 2 May 2000 10:53:30 +0200 Message-ID: <390E977B.81C1E941@jollem.com> Date: Tue, 02 May 2000 10:53:15 +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: Lint on the source (ps7) Content-Type: multipart/mixed; boundary="------------498F0606055638E0F39D34FE" Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org This is a multi-part message in MIME format. --------------498F0606055638E0F39D34FE Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I used lint to check the source code on common errors, but the code looked good to it. I've included the shell script I used to execute lint on the source code (from the src/ directory). A few comments: --1-- The declaration of sysLoadLibrary in linker_md.c is: sysLoadLibrary(const char *name, char *err_buf, int err_buflen) But I believe this should be: sysLoadLibrary(const char *name, char *err_buf, size_t err_buflen) Because the err_buflen is a size of a region in the heap (which is typically a size_t), and because it is used as the 3rd arg in a call to strncpy, which takes a size_t. But this is function specified and used by Sun, so there's little that can be done to `fix' this. --2-- In schedule.c there is a function called lj_setcontext() that is declared to return an int, but it does not. Is this an error? If not, why not? --3-- Overall: Virtually all warnings generated by lint are probably nothing to worry about. Lint reports a lot of dubious operations on enums, constants in conditional contexts, and troublesome pointer casts :-) Ernst -- Ernst de Haan Freelance Java Architect "Come to me all who are weary and burdened, and I will give you rest" -- Jesus Christ --------------498F0606055638E0F39D34FE Content-Type: application/x-sh; name="execlint.sh" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="execlint.sh" #!/bin/sh lint -aa -b -c -e -h -p -r -u -v -z -F -H -Ishare/javavm/include -Ifreebsd/hpi/green_threads/include -Ifreebsd/hpi/export -Ishare/hpi/include -Ishare/hpi/export -Ishare/javavm/export -Ifreebsd/javavm/export -Ifreebsd/hpi/include `find freebsd/ | grep ".*\.c$" | grep -v "^freebsd/test" | grep -v "^freebsd/doc/oldnmi"` --------------498F0606055638E0F39D34FE 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 --------------498F0606055638E0F39D34FE-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message