Patchwork [2/2] guix-register: Fix '--version'.

login
register
mail settings
Submitter Alex Vong
Date Aug. 24, 2016, 1:35 a.m.
Message ID <87bn0jx823.fsf@gmail.com>
Download mbox | patch
Permalink /patch/14894/
State New
Headers show

Comments

Patch

From 66b7781dd5b88bfff465660e9ae02d86a1f4843f Mon Sep 17 00:00:00 2001
From: Alex Vong <alexvong1995@gmail.com>
Date: Wed, 24 Aug 2016 09:25:04 +0800
Subject: [PATCH 2/2] guix-register: Fix '--version'.

* nix/guix-register/guix-register.cc (argp_program_version): Assigning
  instead of declaring.
  (argp_program_bug_address): Likewise.
---
 nix/guix-register/guix-register.cc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/nix/guix-register/guix-register.cc b/nix/guix-register/guix-register.cc
index 16dae62..849e640 100644
--- a/nix/guix-register/guix-register.cc
+++ b/nix/guix-register/guix-register.cc
@@ -2,6 +2,7 @@ 
    Copyright (C) 2013, 2014, 2015 Ludovic Court├Ęs <ludo@gnu.org>
    Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012,
      2013 Eelco Dolstra <eelco.dolstra@logicblox.com>
+   Copyright (C) 2016 Alex Vong <alexvong1995@gmail.com>
 
    This file is part of GNU Guix.
 
@@ -44,10 +45,6 @@  static std::istream *input = &std::cin;
 
 /* Command-line options.  */
 
-const char *argp_program_version =
-  "guix-register (" PACKAGE_NAME ") " PACKAGE_VERSION;
-const char *argp_program_bug_address = PACKAGE_BUGREPORT;
-
 static char doc[] =
 "guix-register -- register a closure as valid in a store\
 \v\
@@ -230,6 +227,9 @@  main (int argc, char *argv[])
 
   try
     {
+      argp_program_version =
+        "guix-register (" PACKAGE_NAME ") " PACKAGE_VERSION;
+      argp_program_bug_address = PACKAGE_BUGREPORT;
       argp_parse (&argp, argc, argv, 0, 0, 0);
 
       /* Instantiate the store.  This creates any missing directories among
-- 
2.9.3