Skip to content

Commit

Permalink
Merge pull request #43 from szhorvat/fix/cleanup
Browse files Browse the repository at this point in the history
Cleanup and fix some memory leaks
  • Loading branch information
ntamas authored Nov 11, 2023
2 parents 3f24873 + 2293f51 commit ae34bcd
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 77 deletions.
2 changes: 1 addition & 1 deletion src/gss.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void gss_parameter_init(gss_parameter_t *param) {
memcpy(param, &_defparam, sizeof(*param));
}

unsigned short int gss_get_warning_flag() {
unsigned short int gss_get_warning_flag(void) {
return gss_i_warning_flag;
}

Expand Down
2 changes: 1 addition & 1 deletion src/gss.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ int gss(double a, double b, double *min, double *fmin,
* The warning flag is 1 if the last optimization was run on a function that
* was not U-shaped.
*/
unsigned short int gss_get_warning_flag();
unsigned short int gss_get_warning_flag(void);

/**
* Initialize GSS parameters to the default values.
Expand Down
1 change: 0 additions & 1 deletion src/lbfgs.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ licence.
#endif

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

#include "lbfgs.h"
Expand Down
2 changes: 1 addition & 1 deletion src/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ inline double _plfit_round(double x) {

/* Dummy function to prevent a warning when compiling with Clang - the file
* would contain no symbols */
void _plfit_i_unused() {}
void _plfit_i_unused(void) {}
Loading

0 comments on commit ae34bcd

Please sign in to comment.