Browse Source

avoid multiple declarations of controlled_exit(), add 'noreturn' attribute

pre-master-46
rlar 13 years ago
parent
commit
aa7a7606c7
  1. 4
      src/frontend/numparam/mystring.c
  2. 2
      src/frontend/numparam/spicenum.c
  3. 2
      src/frontend/trannoise/1-f-code.c
  4. 1
      src/include/ngspice/fteext.h
  5. 7
      src/include/ngspice/ngspice.h
  6. 5
      src/misc/alloc.c
  7. 1
      src/spicelib/devices/bsim3soi_dd/b3soiddld.c
  8. 1
      src/spicelib/devices/bsim3soi_fd/b3soifdld.c
  9. 2
      src/spicelib/devices/cktask.c
  10. 1
      src/spicelib/devices/cpl/cplload.c
  11. 1
      src/spicelib/devices/cpl/cplsetup.c
  12. 1
      src/spicelib/devices/txl/txlload.c
  13. 1
      src/spicelib/devices/txl/txlsetup.c
  14. 1
      src/spicelib/parser/inpptree.c

4
src/frontend/numparam/mystring.c

@ -4,6 +4,8 @@
* Free software under the terms of the GNU Lesser General Public License
*/
#include "ngspice/ngspice.h"
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
@ -19,8 +21,6 @@
#include "general.h"
#include "ngspice/fteext.h" /* controlled_exit() */
/*
* fetch a human answer to a y/n question from stdin

2
src/frontend/numparam/spicenum.c

@ -26,7 +26,7 @@ Todo:
#include "general.h"
#include "numparam.h"
#include "ngspice/fteext.h" /* controlled_exit() */
#include "ngspice/fteext.h"
extern bool ft_batchmode;

2
src/frontend/trannoise/1-f-code.c

@ -19,8 +19,6 @@
#include "fftw3.h"
#endif
extern void controlled_exit(int status);
void
f_alpha(int n_pts, int n_exp, double X[], double Q_d, double alpha)

1
src/include/ngspice/fteext.h

@ -350,6 +350,5 @@ extern bool ft_intrpt;
extern bool ft_setflag;
/* error.c */
extern void controlled_exit(int status);
#endif

7
src/include/ngspice/ngspice.h

@ -299,6 +299,13 @@ extern void SetAnalyse(char *analyse, int percent);
void soa_printf(CKTcircuit *ckt, GENinstance *instance, const char *fmt, ...);
#ifdef __GNUC__
extern void controlled_exit(int status) __attribute__ ((noreturn));
#else
extern void controlled_exit(int status);
#endif
/* macro to ignore unused variables and parameters */
#define NG_IGNORE(x) (void)x
#define NG_IGNOREABLE(x) (void)x

5
src/misc/alloc.c

@ -12,11 +12,6 @@ Copyright 1990 Regents of the University of California. All rights reserved.
*/
#include "ngspice/ngspice.h"
/* We need this because some tests in cmaths and some executables other
than ngspice and ngnutmeg under LINUX don't know about controlled_exit */
#if defined HAS_WINGUI || defined SHARED_MODULE
extern void controlled_exit(int status);
#endif
#ifdef SHARED_MODULE
#ifndef HAVE_LIBPTHREAD

1
src/spicelib/devices/bsim3soi_dd/b3soiddld.c

@ -21,7 +21,6 @@ File: b3soiddld.c 98/5/01
#include "ngspice/devdefs.h"
#include "ngspice/suffix.h"
#include "ngspice/fteext.h" /* controlled_exit() */
#define MAX_EXP 5.834617425e14
#define MIN_EXP 1.713908431e-15

1
src/spicelib/devices/bsim3soi_fd/b3soifdld.c

@ -21,7 +21,6 @@ File: b3soifdld.c 98/5/01
#include "ngspice/devdefs.h"
#include "ngspice/suffix.h"
#include "ngspice/fteext.h" /* controlled_exit() */
#define MAX_EXP 5.834617425e14
#define MIN_EXP 1.713908431e-15

2
src/spicelib/devices/cktask.c

@ -12,7 +12,7 @@ Author: 1985 Thomas L. Quarles
#include "ngspice/sperror.h"
#include "dev.h"
#include "ngspice/fteext.h" /* controlled_exit() */
#include "ngspice/fteext.h"
int
CKTask(CKTcircuit *ckt, GENinstance *instance, int which, IFvalue *value, IFvalue *selector)

1
src/spicelib/devices/cpl/cplload.c

@ -10,7 +10,6 @@ Author: 1992 Charles Hough
#include "ngspice/sperror.h"
#include "ngspice/suffix.h"
#include "ngspice/fteext.h" /* controlled_exit() */
VI_list *pool_vi;
static double ratio[MAX_CP_TX_LINES];

1
src/spicelib/devices/cpl/cplsetup.c

@ -14,7 +14,6 @@ Modified: 2004 Paolo Nenzi - (ng)spice integration
#include "ngspice/multi_line.h"
#include "ngspice/fteext.h" /* controlled_exit() */
#define VECTOR_ALLOC(vec, n) { \

1
src/spicelib/devices/txl/txlload.c

@ -10,7 +10,6 @@ Author: 1992 Charles Hough
#include "ngspice/sperror.h"
#include "ngspice/suffix.h"
#include "ngspice/fteext.h" /* controlled_exit() */
static double ratio[MAX_CP_TX_LINES];
static int update_cnv_txl(TXLine*, double);

1
src/spicelib/devices/txl/txlsetup.c

@ -12,7 +12,6 @@ Author: 1992 Charles Hough
#include "ngspice/sperror.h"
#include "ngspice/suffix.h"
#include "ngspice/fteext.h" /* controlled_exit() */
static int ReadTxL(TXLinstance*, CKTcircuit*);
/*static int multC();*/

1
src/spicelib/parser/inpptree.c

@ -11,7 +11,6 @@ Author: 1987 Wayne A. Christopher, U. C. Berkeley CAD Group
#include "ngspice/inpptree.h"
#include "inpxx.h"
extern void controlled_exit(int status);
static INPparseNode *mkcon(double value);
static INPparseNode *mkb(int type, INPparseNode * left,

Loading…
Cancel
Save