Skip to content

Commit

Permalink
Fix some more -Wstrict-prototypes compiler warnings (#2870)
Browse files Browse the repository at this point in the history
  • Loading branch information
nilason committed Mar 7, 2023
1 parent 20cee66 commit 94afb5d
Show file tree
Hide file tree
Showing 16 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions lib/db/dbmi_base/ret_codes.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
\return DB_OK
*/
int db__send_success()
int db__send_success(void)
{
DB_SEND_INT(DB_OK);
return DB_OK;
Expand All @@ -34,7 +34,7 @@ int db__send_success()
\return DB_OK
*/
int db__send_failure()
int db__send_failure(void)
{
DB_SEND_INT(DB_FAILED);
DB_SEND_C_STRING(db_get_error_msg());
Expand Down
2 changes: 1 addition & 1 deletion lib/db/dbmi_driver/d_bindupdate.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
\return DB_OK on success
\return DB_FAILED on failure
*/
int db_d_bind_update()
int db_d_bind_update(void)
{
dbToken token;
dbCursor *cursor;
Expand Down
2 changes: 1 addition & 1 deletion lib/db/dbmi_driver/d_execute.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ int db_d_begin_transaction(void)
\return DB_OK on success
\return DB_FAILED on failure
*/
int db_d_commit_transaction()
int db_d_commit_transaction(void)
{
int stat;

Expand Down
2 changes: 1 addition & 1 deletion lib/gis/env.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ void G__read_gisrc_env(void)
*
* Calls G_fatal_error when the GISRC variable is not set.
*/
void G__read_gisrc_path()
void G__read_gisrc_path(void)
{
st->gisrc = getenv("GISRC");
if (!st->gisrc) {
Expand Down
4 changes: 2 additions & 2 deletions lib/gis/lz4.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ int LZ4_compressBound(int isize)
return LZ4_COMPRESSBOUND(isize);
}

int LZ4_sizeofState()
int LZ4_sizeofState(void)
{
return LZ4_STREAMSIZE;
}
Expand Down Expand Up @@ -2454,7 +2454,7 @@ int LZ4_uncompress_unknownOutputSize(const char *source, char *dest, int isize,

/* Obsolete Streaming functions */

int LZ4_sizeofStreamState()
int LZ4_sizeofStreamState(void)
{
return LZ4_STREAMSIZE;
}
Expand Down
6 changes: 3 additions & 3 deletions lib/raster3d/defaults.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ void Rast3d_set_cache_size(int nTiles)
* \return int
*/

int Rast3d_get_cache_size()
int Rast3d_get_cache_size(void)
{
return g3d_cache_default;
}
Expand Down Expand Up @@ -187,7 +187,7 @@ void Rast3d_set_cache_limit(int nBytes)
* \return int
*/

int Rast3d_get_cache_limit()
int Rast3d_get_cache_limit(void)
{
return g3d_cache_max;
}
Expand Down Expand Up @@ -217,7 +217,7 @@ void Rast3d_set_file_type(int type)
* \return int
*/

int Rast3d_get_file_type()
int Rast3d_get_file_type(void)
{
return g3d_file_type;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/raster3d/param.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static Rast3d_paramType *param;
* \return void
*/

void Rast3d_set_standard3d_input_params()
void Rast3d_set_standard3d_input_params(void)
{
param = Rast3d_malloc(sizeof(Rast3d_paramType));

Expand Down
2 changes: 1 addition & 1 deletion lib/raster3d/test/test_put_get_value.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static int test_resampling_fcell(RASTER3D_Map *map, double north, double east,
/* *************************************************************** */
/* Perform the put-get value tests ******************************* */
/* *************************************************************** */
int unit_test_put_get_value()
int unit_test_put_get_value(void)
{
int sum = 0;

Expand Down
6 changes: 3 additions & 3 deletions lib/vector/Vlib/cats.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static struct line_cats *Vect__new_cats_struct(void);
\return struct line_cats *
\return NULL on error
*/
struct line_cats *Vect_new_cats_struct()
struct line_cats *Vect_new_cats_struct(void)
{
struct line_cats *p;

Expand All @@ -54,7 +54,7 @@ struct line_cats *Vect_new_cats_struct()
\return struct line_cats *
*/
static struct line_cats *Vect__new_cats_struct()
static struct line_cats *Vect__new_cats_struct(void)
{
struct line_cats *p;

Expand Down Expand Up @@ -306,7 +306,7 @@ int Vect_reset_cats(struct line_cats *Cats)
\return pointer to allocated structure
\return NULL if out of memory
*/
struct cat_list *Vect_new_cat_list()
struct cat_list *Vect_new_cat_list(void)
{
struct cat_list *p;

Expand Down
4 changes: 2 additions & 2 deletions lib/vector/Vlib/line.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct line_pnts *Vect__new_line_struct(void);
\return pointer to line_pnts
*/
struct line_pnts *Vect_new_line_struct()
struct line_pnts *Vect_new_line_struct(void)
{
struct line_pnts *p;

Expand All @@ -52,7 +52,7 @@ struct line_pnts *Vect_new_line_struct()
return p;
}

struct line_pnts *Vect__new_line_struct()
struct line_pnts *Vect__new_line_struct(void)
{
struct line_pnts *p;

Expand Down
2 changes: 1 addition & 1 deletion lib/vector/diglib/struct_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ int dig_isle_alloc_line(struct P_isle *isle, int add)
/*!
\brief For now just print message and return error code
*/
int dig_out_of_memory()
int dig_out_of_memory(void)
{
G_warning(_("Out of memory"));
return -1;
Expand Down
2 changes: 1 addition & 1 deletion raster/r.kappa/print_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "kappa.h"
#include "local_proto.h"

void print_json()
void print_json(void)
{
bool first;
FILE *fd;
Expand Down
2 changes: 1 addition & 1 deletion raster/r.out.vtk/parameters.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/* PARAMETERS ************************************************************** */
/* ************************************************************************* */

void set_params()
void set_params(void)
{
param.input = G_define_standard_option(G_OPT_R_INPUTS);
param.input->required = NO;
Expand Down
2 changes: 1 addition & 1 deletion raster/r.sim/simlib/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ int output_data(int tt, double ft UNUSED)
return 1;
}

int output_et()
int output_et(void)
{

FCELL *tc_cell, *et_cell;
Expand Down
2 changes: 1 addition & 1 deletion raster3d/r3.out.vtk/parameters.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/* ************************************************************************* */
/* Setg up the arguments we are expecting ********************************** */
/* ************************************************************************* */
void set_params()
void set_params(void)
{
param.input = G_define_standard_option(G_OPT_R3_INPUTS);
param.input->required = NO;
Expand Down
2 changes: 1 addition & 1 deletion vector/v.to.db/units.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <string.h>
#include "global.h"

int conv_units()
int conv_units(void)
{
int i, rad;
double f, sq_f;
Expand Down

0 comments on commit 94afb5d

Please sign in to comment.