From patchwork Mon Oct 17 18:49:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesse Barker X-Patchwork-Id: 4714 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 57FF623E51 for ; Mon, 17 Oct 2011 18:49:16 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id 1F162A188DC for ; Mon, 17 Oct 2011 18:49:16 +0000 (UTC) Received: by ywb6 with SMTP id 6so2376756ywb.11 for ; Mon, 17 Oct 2011 11:49:15 -0700 (PDT) Received: by 10.223.4.215 with SMTP id 23mr8164795fas.8.1318877355362; Mon, 17 Oct 2011 11:49:15 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.1.71 with SMTP id 7cs19137lak; Mon, 17 Oct 2011 11:49:14 -0700 (PDT) Received: by 10.216.208.169 with SMTP id q41mr2291868weo.64.1318877353717; Mon, 17 Oct 2011 11:49:13 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id f17si10782715wed.28.2011.10.17.11.49.13 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 17 Oct 2011 11:49:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1RFsFN-0002Mr-0i for ; Mon, 17 Oct 2011 18:49:13 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id EC2D1E03DF for ; Mon, 17 Oct 2011 18:49:12 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: libmatrix X-Launchpad-Branch: ~jesse-barker/libmatrix/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 29 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~jesse-barker/libmatrix/trunk] Rev 29: Unrecognized options were triggering verbose output. This is because the option Message-Id: <20111017184912.4729.26525.launchpad@ackee.canonical.com> Date: Mon, 17 Oct 2011 18:49:12 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="14157"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 2d75b1e505afbd76f94e6bed610f612bed6e7f51 ------------------------------------------------------------ revno: 29 committer: Jesse Barker branch nick: trunk timestamp: Mon 2011-10-17 11:46:36 -0700 message: Unrecognized options were triggering verbose output. This is because the option parser was not detecting when getopt_long was signaling an unrecognized option (see comment in code for more details). modified: test/options.cc --- lp:libmatrix https://code.launchpad.net/~jesse-barker/libmatrix/trunk You are subscribed to branch lp:libmatrix. To unsubscribe from this branch go to https://code.launchpad.net/~jesse-barker/libmatrix/trunk/+edit-subscription === modified file 'test/options.cc' --- test/options.cc 2011-06-22 23:11:46 +0000 +++ test/options.cc 2011-10-17 18:46:36 +0000 @@ -32,6 +32,15 @@ int c = getopt_long(argc, argv, "", long_options, &option_index); while (c != -1) { + // getopt_long() returns '?' and prints an "unrecognized option" error + // to stderr if it does not recognize an option. Just trigger + // the help/usage message, stop processing and get out. + if (c == '?') + { + show_help_ = true; + break; + } + std::string optname(long_options[option_index].name); if (optname == verbose_name_)