Changeset 2e385d in git


Ignore:
Timestamp:
Nov 11, 2022, 2:37:17 AM (3 months ago)
Author:
Michael Orlitzky <michael@…>
Branches:
(u'spielwiese', 'ad2543eab51733612ba7d118afc77edca719600e')
Children:
b6647a741b9091b82021ff46d4c112099d175d57
Parents:
4969bd84679f00e0090770de53eae064004f1330
git-author:
Michael Orlitzky <michael@orlitzky.com>2022-11-10 20:37:17-05:00
git-committer:
Michael Orlitzky <michael@orlitzky.com>2022-11-10 21:33:22-05:00
Message:
*/*.{c,h}: fix invalid function prototypes.

The C99 standard does not allow function prototypes (or inline
definitions) to have an empty argument list, such as

  int foo(); /* invalid */

This is caught by -Werror=strict-prototypes, which is likely to become
the default in later versions of GCC and clang. This commit corrects
all(?) of them by adding a "void" parameter.
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • Singular/cntrlc.h

    r4969bd8 r2e385d  
    1414EXTERN_VAR short si_restart;
    1515EXTERN_VAR int siRandomStart;
    16 void init_signals();
     16void init_signals(void);
    1717
    1818EXTERN_VAR BOOLEAN singular_in_batchmode;
  • kernel/mod2.h

    r4969bd8 r2e385d  
    124124#endif
    125125
    126 static inline void HALT() { m2_end(2);}
     126static inline void HALT(void) { m2_end(2);}
    127127
    128128/* define OLD_RES for res/sres/mres(i,j,k) */
     
    374374/* within a debugger, set a breakpoint on dErrorBreak
    375375* which is called after the error has been reported */
    376 extern void dErrorBreak();
     376extern void dErrorBreak(void);
    377377#ifdef __cplusplus
    378378}
  • kernel/oswrapper/fereadl.c

    r4969bd8 r2e385d  
    826826/* ===================================================================*/
    827827#if defined(HAVE_READLINE) && !defined(HAVE_FEREAD) && !defined(HAVE_DYN_RL)
    828 extern int history_total_bytes();
     828extern int history_total_bytes(void);
    829829extern int write_history (const char *);
    830830#endif
    831 void fe_reset_input_mode ()
     831void fe_reset_input_mode (void)
    832832{
    833833#if defined(HAVE_DYN_RL)
  • kernel/oswrapper/rlimit.h

    r4969bd8 r2e385d  
    1515#endif
    1616
    17 int raise_rlimit_nproc();
     17int raise_rlimit_nproc(void);
    1818
    1919#ifdef __cplusplus
  • libpolys/misc/sirandom.h

    r4969bd8 r2e385d  
    55#endif
    66EXTERN_VAR int siSeed;
    7 int siRand();
     7int siRand(void);
    88
    9 typedef int (*siRandProc)();
     9typedef int (*siRandProc)(void);
    1010typedef int (*siRandProc1)(int);
    1111int siRandNext(int);
  • omalloc/omBin.h

    r4969bd8 r2e385d  
    1515#define omDeleteSpecBin(bin_ptr) _omUnGetSpecBin(bin_ptr, 1)
    1616void _omUnGetSpecBin(omBin *bin, int force);
    17 long omGetUsedBinBytes();
     17long omGetUsedBinBytes(void);
    1818
    1919omBin omGetStickyBinOfBin(omBin bin);
     
    2525void omDeleteStickyBinTag(omBin bin, unsigned long sticky);
    2626
    27 unsigned long omGetNewStickyAllBinTag();
     27unsigned long omGetNewStickyAllBinTag(void);
    2828void omSetStickyAllBinTag(unsigned long sticky);
    2929void omUnSetStickyAllBinTag(unsigned long sticky);
  • omalloc/omBinPage.h

    r4969bd8 r2e385d  
    8383 *******************************************************************/
    8484extern omBinPage omAllocBinPages(int how_many);
    85 extern omBinPage omAllocBinPage();
     85extern omBinPage omAllocBinPage(void);
    8686
    8787extern void omFreeBinPages(omBinPage page, int how_many);
  • omalloc/omError.h

    r4969bd8 r2e385d  
    5656
    5757/* this is a dummy function and used as default for om_Opts.ErrorHook */
    58 extern void omErrorBreak();
     58extern void omErrorBreak(void);
    5959
    6060#ifndef OM_NDEBUG
  • omalloc/omOpts.h

    r4969bd8 r2e385d  
    1919  int MarkAsStatic;
    2020  unsigned int PagesPerRegion;
    21   void (*OutOfMemoryFunc)();
    22   void (*MemoryLowFunc)();
    23   void (*ErrorHook)();
     21  void (*OutOfMemoryFunc)(void);
     22  void (*MemoryLowFunc)(void);
     23  void (*ErrorHook)(void);
    2424};
    2525extern omOpts_t om_Opts;
  • omalloc/omStats.h

    r4969bd8 r2e385d  
    3535
    3636/* returns a copy of omallinfo struct */
    37 extern struct omInfo_s omGetInfo();
     37extern struct omInfo_s omGetInfo(void);
    3838/* the struct itself which is always up-to-date */
    3939/* use read-only */
    4040extern struct omInfo_s om_Info;
    4141/* update the global info struct */
    42 extern void omUpdateInfo();
     42extern void omUpdateInfo(void);
    4343/* initialize such that sbrk can be measured */
    44 extern void omInitInfo();
     44extern void omInitInfo(void);
    4545extern void omPrintStats(FILE* fd);
    4646extern void omPrintInfo(FILE* fd);
Note: See TracChangeset for help on using the changeset viewer.