From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 5E1C07EE8B for ; Mon, 25 Mar 2013 07:08:49 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of garrigue@math.nagoya-u.ac.jp) identity=pra; client-ip=133.6.130.5; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="garrigue@math.nagoya-u.ac.jp"; x-sender="garrigue@math.nagoya-u.ac.jp"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of garrigue@math.nagoya-u.ac.jp) identity=mailfrom; client-ip=133.6.130.5; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="garrigue@math.nagoya-u.ac.jp"; x-sender="garrigue@math.nagoya-u.ac.jp"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mailhost.math.nagoya-u.ac.jp) identity=helo; client-ip=133.6.130.5; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="garrigue@math.nagoya-u.ac.jp"; x-sender="postmaster@mailhost.math.nagoya-u.ac.jp"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AugAAJHoT1GFBoIFl2dsb2JhbABDxWOCEw4BAQEBAQgWBzyCJAEBBAEnHAE1AgMLCzQSVwYTiA4Frw6EQQKFAIkIB48YB4JfYYh6jXCUHQ X-IPAS-Result: AugAAJHoT1GFBoIFl2dsb2JhbABDxWOCEw4BAQEBAQgWBzyCJAEBBAEnHAE1AgMLCzQSVwYTiA4Frw6EQQKFAIkIB48YB4JfYYh6jXCUHQ X-IronPort-AV: E=Sophos;i="4.84,902,1355094000"; d="scan'208";a="7668231" Received: from rabbit.math.nagoya-u.ac.jp (HELO mailhost.math.nagoya-u.ac.jp) ([133.6.130.5]) by mail3-smtp-sop.national.inria.fr with ESMTP; 25 Mar 2013 07:08:48 +0100 Received: from mailhost.math.nagoya-u.ac.jp (localhost [127.0.0.1]) by mailhost.math.nagoya-u.ac.jp (Postfix) with ESMTP id 2B47563C1; Mon, 25 Mar 2013 15:08:47 +0900 (JST) Received: from mailhost.math.nagoya-u.ac.jp (localhost [127.0.0.1]) by mailhost.math.nagoya-u.ac.jp (Postfix) with ESMTP id DD9E14118; Mon, 25 Mar 2013 15:08:46 +0900 (JST) DomainKey-Signature: h=Received:Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer; b=; c=nofws; d=math.nagoya-u.ac.jp; q=; s=alpha Received: from tet.garrigue.jp (58x158x128x157.ap58.ftth.ucom.ne.jp [58.158.128.157]) by mailhost.math.nagoya-u.ac.jp (Postfix) with ESMTPSA id 9EF1D4116; Mon, 25 Mar 2013 15:08:46 +0900 (JST) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) From: Jacques Garrigue In-Reply-To: <514FD96E.9010209@riken.jp> Date: Mon, 25 Mar 2013 15:08:48 +0900 Cc: OCaML List Mailing Content-Transfer-Encoding: 7bit Message-Id: <67C58E5F-89D5-4800-B227-22DEA5F92B5B@math.nagoya-u.ac.jp> References: <514C1E1B.9050907@riken.jp> <514FD96E.9010209@riken.jp> To: Francois Berenger X-Mailer: Apple Mail (2.1503) Subject: Re: [Caml-list] Warning 20: Unused function argument On 2013/03/25, at 13:58, Francois Berenger wrote: > So, there is no warning about unused formal parameters? > > After some large refactoring of some code, I may have some. > > If I understand correctly: > > # ocaml -w +20 > # let test_w20 x y z = x, y;; > val test_w20 : 'a -> 'b -> 'c -> 'a * 'b = > # test_w20 1 2 3;; > - : int * int = (1, 2) > > Produces no warning. You are just using the wrong warning: $ ocaml -w +27 OCaml version 4.00.2+dev0-2012-10-03 # let test_w20 x y z = x, y;; Warning 27: unused variable z. val test_w20 : 'a -> 'b -> 'c -> 'a * 'b = But expect lots of warning in legacy code, as it warns about _all_ unused variables, including inside pattern-matching. Jacques