Cleanup programs further
removed casting of main args to void
diff --git a/programs/x509/cert_app.c b/programs/x509/cert_app.c
index 5d9348d..d74b4da 100644
--- a/programs/x509/cert_app.c
+++ b/programs/x509/cert_app.c
@@ -64,16 +64,33 @@
#define DFL_DEBUG_LEVEL 0
#define DFL_PERMISSIVE 0
+#define USAGE_IO \
+ " ca_file=%%s The single file containing the top-level CA(s) you fully trust\n" \
+ " default: \"\" (none)\n" \
+ " crl_file=%%s The single CRL file you want to use\n" \
+ " default: \"\" (none)\n" \
+ " ca_path=%%s The path containing the top-level CA(s) you fully trust\n" \
+ " default: \"\" (none) (overrides ca_file)\n"
+
+#define USAGE \
+ "\n usage: cert_app param=<>...\n" \
+ "\n acceptable parameters:\n" \
+ " mode=file|ssl default: none\n" \
+ " filename=%%s default: cert.crt\n" \
+ USAGE_IO \
+ " server_name=%%s default: localhost\n" \
+ " server_port=%%d default: 4433\n" \
+ " debug_level=%%d default: 0 (disabled)\n" \
+ " permissive=%%d default: 0 (disabled)\n" \
+ "\n"
+
#if !defined(POLARSSL_BIGNUM_C) || !defined(POLARSSL_ENTROPY_C) || \
!defined(POLARSSL_SSL_TLS_C) || !defined(POLARSSL_SSL_CLI_C) || \
!defined(POLARSSL_NET_C) || !defined(POLARSSL_RSA_C) || \
!defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_FS_IO) || \
!defined(POLARSSL_CTR_DRBG_C)
-int main( int argc, char *argv[] )
+int main( void )
{
- ((void) argc);
- ((void) argv);
-
polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_ENTROPY_C and/or "
"POLARSSL_SSL_TLS_C and/or POLARSSL_SSL_CLI_C and/or "
"POLARSSL_NET_C and/or POLARSSL_RSA_C and/or "
@@ -143,26 +160,6 @@
return( 0 );
}
-#define USAGE_IO \
- " ca_file=%%s The single file containing the top-level CA(s) you fully trust\n" \
- " default: \"\" (none)\n" \
- " crl_file=%%s The single CRL file you want to use\n" \
- " default: \"\" (none)\n" \
- " ca_path=%%s The path containing the top-level CA(s) you fully trust\n" \
- " default: \"\" (none) (overrides ca_file)\n"
-
-#define USAGE \
- "\n usage: cert_app param=<>...\n" \
- "\n acceptable parameters:\n" \
- " mode=file|ssl default: none\n" \
- " filename=%%s default: cert.crt\n" \
- USAGE_IO \
- " server_name=%%s default: localhost\n" \
- " server_port=%%d default: 4433\n" \
- " debug_level=%%d default: 0 (disabled)\n" \
- " permissive=%%d default: 0 (disabled)\n" \
- "\n"
-
int main( int argc, char *argv[] )
{
int ret = 0, server_fd;
diff --git a/programs/x509/cert_req.c b/programs/x509/cert_req.c
index e978201..d8527c6 100644
--- a/programs/x509/cert_req.c
+++ b/programs/x509/cert_req.c
@@ -83,11 +83,8 @@
#if !defined(POLARSSL_X509_CSR_WRITE_C) || !defined(POLARSSL_FS_IO) || \
!defined(POLARSSL_PK_PARSE_C) || \
!defined(POLARSSL_ENTROPY_C) || !defined(POLARSSL_CTR_DRBG_C)
-int main( int argc, char *argv[] )
+int main( void )
{
- ((void) argc);
- ((void) argv);
-
polarssl_printf( "POLARSSL_X509_CSR_WRITE_C and/or POLARSSL_FS_IO and/or "
"POLARSSL_PK_PARSE_C and/or "
"POLARSSL_ENTROPY_C and/or POLARSSL_CTR_DRBG_C "
diff --git a/programs/x509/cert_write.c b/programs/x509/cert_write.c
index aa1cf54..ed6f218 100644
--- a/programs/x509/cert_write.c
+++ b/programs/x509/cert_write.c
@@ -124,11 +124,8 @@
!defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_FS_IO) || \
!defined(POLARSSL_ENTROPY_C) || !defined(POLARSSL_CTR_DRBG_C) || \
!defined(POLARSSL_ERROR_C)
-int main( int argc, char *argv[] )
+int main( void )
{
- ((void) argc);
- ((void) argv);
-
polarssl_printf( "POLARSSL_X509_CRT_WRITE_C and/or POLARSSL_X509_CRT_PARSE_C and/or "
"POLARSSL_FS_IO and/or "
"POLARSSL_ENTROPY_C and/or POLARSSL_CTR_DRBG_C and/or "
diff --git a/programs/x509/crl_app.c b/programs/x509/crl_app.c
index e634cca..0639566 100644
--- a/programs/x509/crl_app.c
+++ b/programs/x509/crl_app.c
@@ -53,11 +53,8 @@
#if !defined(POLARSSL_BIGNUM_C) || !defined(POLARSSL_RSA_C) || \
!defined(POLARSSL_X509_CRL_PARSE_C) || !defined(POLARSSL_FS_IO)
-int main( int argc, char *argv[] )
+int main( void )
{
- ((void) argc);
- ((void) argv);
-
polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_RSA_C and/or "
"POLARSSL_X509_CRL_PARSE_C and/or POLARSSL_FS_IO not defined.\n");
return( 0 );
diff --git a/programs/x509/req_app.c b/programs/x509/req_app.c
index 3aa5f41..2058e4c 100644
--- a/programs/x509/req_app.c
+++ b/programs/x509/req_app.c
@@ -53,11 +53,8 @@
#if !defined(POLARSSL_BIGNUM_C) || !defined(POLARSSL_RSA_C) || \
!defined(POLARSSL_X509_CSR_PARSE_C) || !defined(POLARSSL_FS_IO)
-int main( int argc, char *argv[] )
+int main( void )
{
- ((void) argc);
- ((void) argv);
-
polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_RSA_C and/or "
"POLARSSL_X509_CSR_PARSE_C and/or POLARSSL_FS_IO not defined.\n");
return( 0 );