On 21/06/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Revision: 3183
Author:   aj
Date:     2007-06-21 12:58:57 +0000 (Thu, 21 Jun 2007)

Log Message:
-----------
silence more warnings.

You may have less warnings but now more errors :-)

For example:
pkcs15-crypt.c:40: error: static declaration of 'app_name' follows
non-static declaration
util.h:28: error: previous declaration of 'app_name' was here

util.h has:
extern const char *app_name;

and pkcs15-crypt.c has:
#include "util.h"

static const char *app_name = "pkcs15-crypt";


You can't have a variable declared static if you also want to use it
from another source file. app_name is also used by util.c

I include a patch.

bye

--
Dr. Ludovic Rousseau
Index: src/tools/cardos-info.c
===================================================================
--- src/tools/cardos-info.c     (révision 3183)
+++ src/tools/cardos-info.c     (copie de travail)
@@ -39,7 +39,7 @@ const char *app_name = "cardos-info";
 static int opt_reader = -1, opt_debug = 0, opt_wait = 0;
 static int verbose = 0;
 
-static const struct option options[] = {
+const struct option options[] = {
        {"reader",      1, NULL, 'r'},
        {"card-driver", 1, NULL, 'c'},
        {"wait",        0, NULL, 'w'},
@@ -47,7 +47,7 @@ static const struct option options[] = {
        {NULL, 0, NULL, 0}
 };
 
-static const char *option_help[] = {
+const char *option_help[] = {
        "Uses reader number <arg> [0]",
        "Forces the use of driver <arg> [auto-detect]",
        "Wait for a card to be inserted",
Index: src/tools/pkcs15-crypt.c
===================================================================
--- src/tools/pkcs15-crypt.c    (révision 3183)
+++ src/tools/pkcs15-crypt.c    (copie de travail)
@@ -37,7 +37,7 @@
 #endif
 #include "util.h"
 
-static const char *app_name = "pkcs15-crypt";
+const char *app_name = "pkcs15-crypt";
 
 static int opt_reader = -1, verbose = 0, opt_wait = 0, opt_raw = 0;
 static char * opt_pincode = NULL, * opt_key_id = NULL;
Index: src/tools/cryptoflex-tool.c
===================================================================
--- src/tools/cryptoflex-tool.c (révision 3183)
+++ src/tools/cryptoflex-tool.c (copie de travail)
@@ -44,7 +44,7 @@ static int opt_puk_attempts = 10;
 static const char *opt_appdf = NULL, *opt_prkeyf = NULL, *opt_pubkeyf = NULL;
 static u8 *pincode = NULL;
 
-static const struct option options[] = {
+const struct option options[] = {
        { "list-keys",          0, NULL,                'l' },
        { "create-key-files",   1, NULL,                'c' },
        { "create-pin-file",    1, NULL,                'P' },
@@ -62,7 +62,7 @@ static const struct option options[] = {
        { NULL, 0, NULL, 0 }
 };
 
-static const char *option_help[] = {
+const char *option_help[] = {
        "Lists all keys in a public key file",
        "Creates new RSA key files for <arg> keys",
        "Creates a new CHV<arg> file",
_______________________________________________
opensc-devel mailing list
[email protected]
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to