Skip to content

Commit bd278d4

Browse files
authored
Minor fixes (#198)
* fix(dftd4.h): prototype declarations * fix(test_example): initialize `error`
1 parent 98a3555 commit bd278d4

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

include/dftd4.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ typedef struct _dftd4_param* dftd4_param;
6161

6262
/// Obtain library version as major * 10000 + minor + 100 + patch
6363
DFTD4_API_ENTRY int DFTD4_API_CALL
64-
dftd4_get_version() DFTD4_API_SUFFIX__V_3_0;
64+
dftd4_get_version(void) DFTD4_API_SUFFIX__V_3_0;
6565

6666
/*
6767
* Error handle class
6868
**/
6969

7070
/// Create new error handle object
7171
DFTD4_API_ENTRY dftd4_error DFTD4_API_CALL
72-
dftd4_new_error() DFTD4_API_SUFFIX__V_3_0;
72+
dftd4_new_error(void) DFTD4_API_SUFFIX__V_3_0;
7373

7474
/// Check error handle status
7575
DFTD4_API_ENTRY int DFTD4_API_CALL

test/api/example.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,12 @@ int test_example(void)
8989
hessian = (double*)malloc(nat3_sq * sizeof(double));
9090
c6 = (double*)malloc(nat_sq * sizeof(double));
9191

92+
dftd4_error error = NULL;
93+
9294
if (dftd4_get_version() <= 0) {
9395
goto err;
9496
}
9597

96-
dftd4_error error;
9798
dftd4_structure mol;
9899
dftd4_model disp;
99100
dftd4_param param;

0 commit comments

Comments
 (0)