Skip to content

Commit

Permalink
[example] Correct function prototype for parse_command_line
Browse files Browse the repository at this point in the history
Clang 17 warns about the former, incorrect way.
  • Loading branch information
gruenich committed Oct 9, 2023
1 parent 2947017 commit 4cd3797
Show file tree
Hide file tree
Showing 16 changed files with 48 additions and 32 deletions.
5 changes: 3 additions & 2 deletions EXAMPLE/clinsolx.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ at the top-level directory.
#include <getopt.h>
#include "slu_cdefs.h"

void parse_command_line(int argc, char *argv[], int *lwork,
double *u, yes_no_t *equil, trans_t *trans);

int main(int argc, char *argv[])
{
char equed[1];
Expand Down Expand Up @@ -56,8 +59,6 @@ int main(int argc, char *argv[])
SuperLUStat_t stat;
FILE *fp = stdin;

extern void parse_command_line();

#if ( DEBUGlevel>=1 )
CHECK_MALLOC("Enter main()");
#endif
Expand Down
5 changes: 3 additions & 2 deletions EXAMPLE/clinsolx1.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ at the top-level directory.
#include <getopt.h>
#include "slu_cdefs.h"

void parse_command_line(int argc, char *argv[], int *lwork,
double *u, yes_no_t *equil, trans_t *trans);

int main(int argc, char *argv[])
{
/*
Expand Down Expand Up @@ -70,8 +73,6 @@ int main(int argc, char *argv[])
SuperLUStat_t stat;
FILE *fp = stdin;

extern void parse_command_line();

#if ( DEBUGlevel>=1 )
CHECK_MALLOC("Enter main()");
#endif
Expand Down
5 changes: 3 additions & 2 deletions EXAMPLE/clinsolx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ at the top-level directory.
#include <getopt.h>
#include "slu_cdefs.h"

void parse_command_line(int argc, char *argv[], int *lwork,
double *u, yes_no_t *equil, trans_t *trans);

int main(int argc, char *argv[])
{
/*!
Expand Down Expand Up @@ -66,8 +69,6 @@ int main(int argc, char *argv[])
SuperLUStat_t stat;
FILE *fp = stdin;

extern void parse_command_line();

#if ( DEBUGlevel>=1 )
CHECK_MALLOC("Enter main()");
#endif
Expand Down
5 changes: 3 additions & 2 deletions EXAMPLE/clinsolx3.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ at the top-level directory.
#include <getopt.h>
#include "slu_cdefs.h"

void parse_command_line(int argc, char *argv[], int *lwork,
double *u, yes_no_t *equil, trans_t *trans);

/*!
* \brief The driver program CLINSOLX2.
*
Expand Down Expand Up @@ -65,8 +68,6 @@ int main(int argc, char *argv[])
SuperLUStat_t stat;
FILE *fp = stdin;

extern void parse_command_line();

#if ( DEBUGlevel>=1 )
CHECK_MALLOC("Enter main()");
#endif
Expand Down
5 changes: 3 additions & 2 deletions EXAMPLE/dlinsolx.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ at the top-level directory.
#include <getopt.h>
#include "slu_ddefs.h"

void parse_command_line(int argc, char *argv[], int *lwork,
double *u, yes_no_t *equil, trans_t *trans);

int main(int argc, char *argv[])
{
char equed[1];
Expand Down Expand Up @@ -56,8 +59,6 @@ int main(int argc, char *argv[])
SuperLUStat_t stat;
FILE *fp = stdin;

extern void parse_command_line();

#if ( DEBUGlevel>=1 )
CHECK_MALLOC("Enter main()");
#endif
Expand Down
5 changes: 3 additions & 2 deletions EXAMPLE/dlinsolx1.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ at the top-level directory.
#include <getopt.h>
#include "slu_ddefs.h"

void parse_command_line(int argc, char *argv[], int *lwork,
double *u, yes_no_t *equil, trans_t *trans);

/*!
* \brief The driver program DLINSOLX1.
*
Expand Down Expand Up @@ -66,8 +69,6 @@ int main(int argc, char *argv[])
SuperLUStat_t stat;
FILE *fp = stdin;

extern void parse_command_line();

#if ( DEBUGlevel>=1 )
CHECK_MALLOC("Enter main()");
#endif
Expand Down
5 changes: 3 additions & 2 deletions EXAMPLE/dlinsolx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ at the top-level directory.
#include <getopt.h>
#include "slu_ddefs.h"

void parse_command_line(int argc, char *argv[], int *lwork,
double *u, yes_no_t *equil, trans_t *trans);

/*!
* \brief The driver program DLINSOLX2.
*
Expand Down Expand Up @@ -66,8 +69,6 @@ int main(int argc, char *argv[])
SuperLUStat_t stat;
FILE *fp = stdin;

extern void parse_command_line();

#if ( DEBUGlevel>=1 )
CHECK_MALLOC("Enter main()");
#endif
Expand Down
5 changes: 3 additions & 2 deletions EXAMPLE/dlinsolx3.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ at the top-level directory.
#include <getopt.h>
#include "slu_ddefs.h"

void parse_command_line(int argc, char *argv[], int *lwork,
double *u, yes_no_t *equil, trans_t *trans);

/*!
* \brief The driver program DLINSOLX2.
*
Expand Down Expand Up @@ -65,8 +68,6 @@ int main(int argc, char *argv[])
SuperLUStat_t stat;
FILE *fp = stdin;

extern void parse_command_line();

#if ( DEBUGlevel>=1 )
CHECK_MALLOC("Enter main()");
#endif
Expand Down
5 changes: 3 additions & 2 deletions EXAMPLE/slinsolx.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ at the top-level directory.
#include <getopt.h>
#include "slu_sdefs.h"

void parse_command_line(int argc, char *argv[], int *lwork,
double *u, yes_no_t *equil, trans_t *trans);

int main(int argc, char *argv[])
{
char equed[1];
Expand Down Expand Up @@ -56,8 +59,6 @@ int main(int argc, char *argv[])
SuperLUStat_t stat;
FILE *fp = stdin;

extern void parse_command_line();

#if ( DEBUGlevel>=1 )
CHECK_MALLOC("Enter main()");
#endif
Expand Down
5 changes: 3 additions & 2 deletions EXAMPLE/slinsolx1.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ at the top-level directory.
#include <getopt.h>
#include "slu_sdefs.h"

void parse_command_line(int argc, char *argv[], int *lwork,
double *u, yes_no_t *equil, trans_t *trans);

int main(int argc, char *argv[])
{
/*
Expand Down Expand Up @@ -70,8 +73,6 @@ int main(int argc, char *argv[])
SuperLUStat_t stat;
FILE *fp = stdin;

extern void parse_command_line();

#if ( DEBUGlevel>=1 )
CHECK_MALLOC("Enter main()");
#endif
Expand Down
5 changes: 3 additions & 2 deletions EXAMPLE/slinsolx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ at the top-level directory.
#include <getopt.h>
#include "slu_sdefs.h"

void parse_command_line(int argc, char *argv[], int *lwork,
double *u, yes_no_t *equil, trans_t *trans);

/*!
* \brief The driver program SLINSOLX2.
*
Expand Down Expand Up @@ -66,8 +69,6 @@ int main(int argc, char *argv[])
SuperLUStat_t stat;
FILE *fp = stdin;

extern void parse_command_line();

#if ( DEBUGlevel>=1 )
CHECK_MALLOC("Enter main()");
#endif
Expand Down
5 changes: 3 additions & 2 deletions EXAMPLE/slinsolx3.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ at the top-level directory.
#include <getopt.h>
#include "slu_sdefs.h"

void parse_command_line(int argc, char *argv[], int *lwork,
double *u, yes_no_t *equil, trans_t *trans);

/*!
* \brief The driver program SLINSOLX2.
*
Expand Down Expand Up @@ -65,8 +68,6 @@ int main(int argc, char *argv[])
SuperLUStat_t stat;
FILE *fp = stdin;

extern void parse_command_line();

#if ( DEBUGlevel>=1 )
CHECK_MALLOC("Enter main()");
#endif
Expand Down
5 changes: 3 additions & 2 deletions EXAMPLE/zlinsolx.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ at the top-level directory.
#include <getopt.h>
#include "slu_zdefs.h"

void parse_command_line(int argc, char *argv[], int *lwork,
double *u, yes_no_t *equil, trans_t *trans);

int main(int argc, char *argv[])
{
char equed[1];
Expand Down Expand Up @@ -56,8 +59,6 @@ int main(int argc, char *argv[])
SuperLUStat_t stat;
FILE *fp = stdin;

extern void parse_command_line();

#if ( DEBUGlevel>=1 )
CHECK_MALLOC("Enter main()");
#endif
Expand Down
5 changes: 3 additions & 2 deletions EXAMPLE/zlinsolx1.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ at the top-level directory.
#include <getopt.h>
#include "slu_zdefs.h"

void parse_command_line(int argc, char *argv[], int *lwork,
double *u, yes_no_t *equil, trans_t *trans);

/*!
* \brief The driver program ZLINSOLX1.
*
Expand Down Expand Up @@ -66,8 +69,6 @@ int main(int argc, char *argv[])
SuperLUStat_t stat;
FILE *fp = stdin;

extern void parse_command_line();

#if ( DEBUGlevel>=1 )
CHECK_MALLOC("Enter main()");
#endif
Expand Down
5 changes: 3 additions & 2 deletions EXAMPLE/zlinsolx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ at the top-level directory.
#include <getopt.h>
#include "slu_zdefs.h"

void parse_command_line(int argc, char *argv[], int *lwork,
double *u, yes_no_t *equil, trans_t *trans);

/*!
* \brief The driver program ZLINSOLX2.
*
Expand Down Expand Up @@ -66,8 +69,6 @@ int main(int argc, char *argv[])
SuperLUStat_t stat;
FILE *fp = stdin;

extern void parse_command_line();

#if ( DEBUGlevel>=1 )
CHECK_MALLOC("Enter main()");
#endif
Expand Down
5 changes: 3 additions & 2 deletions EXAMPLE/zlinsolx3.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ at the top-level directory.
#include <getopt.h>
#include "slu_zdefs.h"

void parse_command_line(int argc, char *argv[], int *lwork,
double *u, yes_no_t *equil, trans_t *trans);

/*!
* \brief The driver program ZLINSOLX2.
*
Expand Down Expand Up @@ -65,8 +68,6 @@ int main(int argc, char *argv[])
SuperLUStat_t stat;
FILE *fp = stdin;

extern void parse_command_line();

#if ( DEBUGlevel>=1 )
CHECK_MALLOC("Enter main()");
#endif
Expand Down

0 comments on commit 4cd3797

Please sign in to comment.