Skip to content

Commit 5dc1f2b

Browse files
authored
Merge pull request #16 from nicolasdanet/master
Avoid missing initializer warnings
2 parents ebac571 + 24b8c41 commit 5dc1f2b

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

tinyexpr.c

100644100755
Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -116,32 +116,32 @@ static double e() {return 2.71828182845904523536;}
116116

117117
static const te_variable functions[] = {
118118
/* must be in alphabetical order */
119-
{"abs", fabs, TE_FUNCTION1 | TE_FLAG_PURE},
120-
{"acos", acos, TE_FUNCTION1 | TE_FLAG_PURE},
121-
{"asin", asin, TE_FUNCTION1 | TE_FLAG_PURE},
122-
{"atan", atan, TE_FUNCTION1 | TE_FLAG_PURE},
123-
{"atan2", atan2, TE_FUNCTION2 | TE_FLAG_PURE},
124-
{"ceil", ceil, TE_FUNCTION1 | TE_FLAG_PURE},
125-
{"cos", cos, TE_FUNCTION1 | TE_FLAG_PURE},
126-
{"cosh", cosh, TE_FUNCTION1 | TE_FLAG_PURE},
127-
{"e", e, TE_FUNCTION0 | TE_FLAG_PURE},
128-
{"exp", exp, TE_FUNCTION1 | TE_FLAG_PURE},
129-
{"floor", floor, TE_FUNCTION1 | TE_FLAG_PURE},
130-
{"ln", log, TE_FUNCTION1 | TE_FLAG_PURE},
119+
{"abs", fabs, TE_FUNCTION1 | TE_FLAG_PURE, 0},
120+
{"acos", acos, TE_FUNCTION1 | TE_FLAG_PURE, 0},
121+
{"asin", asin, TE_FUNCTION1 | TE_FLAG_PURE, 0},
122+
{"atan", atan, TE_FUNCTION1 | TE_FLAG_PURE, 0},
123+
{"atan2", atan2, TE_FUNCTION2 | TE_FLAG_PURE, 0},
124+
{"ceil", ceil, TE_FUNCTION1 | TE_FLAG_PURE, 0},
125+
{"cos", cos, TE_FUNCTION1 | TE_FLAG_PURE, 0},
126+
{"cosh", cosh, TE_FUNCTION1 | TE_FLAG_PURE, 0},
127+
{"e", e, TE_FUNCTION0 | TE_FLAG_PURE, 0},
128+
{"exp", exp, TE_FUNCTION1 | TE_FLAG_PURE, 0},
129+
{"floor", floor, TE_FUNCTION1 | TE_FLAG_PURE, 0},
130+
{"ln", log, TE_FUNCTION1 | TE_FLAG_PURE, 0},
131131
#ifdef TE_NAT_LOG
132-
{"log", log, TE_FUNCTION1 | TE_FLAG_PURE},
132+
{"log", log, TE_FUNCTION1 | TE_FLAG_PURE, 0},
133133
#else
134-
{"log", log10, TE_FUNCTION1 | TE_FLAG_PURE},
134+
{"log", log10, TE_FUNCTION1 | TE_FLAG_PURE, 0},
135135
#endif
136-
{"log10", log10, TE_FUNCTION1 | TE_FLAG_PURE},
137-
{"pi", pi, TE_FUNCTION0 | TE_FLAG_PURE},
138-
{"pow", pow, TE_FUNCTION2 | TE_FLAG_PURE},
139-
{"sin", sin, TE_FUNCTION1 | TE_FLAG_PURE},
140-
{"sinh", sinh, TE_FUNCTION1 | TE_FLAG_PURE},
141-
{"sqrt", sqrt, TE_FUNCTION1 | TE_FLAG_PURE},
142-
{"tan", tan, TE_FUNCTION1 | TE_FLAG_PURE},
143-
{"tanh", tanh, TE_FUNCTION1 | TE_FLAG_PURE},
144-
{0}
136+
{"log10", log10, TE_FUNCTION1 | TE_FLAG_PURE, 0},
137+
{"pi", pi, TE_FUNCTION0 | TE_FLAG_PURE, 0},
138+
{"pow", pow, TE_FUNCTION2 | TE_FLAG_PURE, 0},
139+
{"sin", sin, TE_FUNCTION1 | TE_FLAG_PURE, 0},
140+
{"sinh", sinh, TE_FUNCTION1 | TE_FLAG_PURE, 0},
141+
{"sqrt", sqrt, TE_FUNCTION1 | TE_FLAG_PURE, 0},
142+
{"tan", tan, TE_FUNCTION1 | TE_FLAG_PURE, 0},
143+
{"tanh", tanh, TE_FUNCTION1 | TE_FLAG_PURE, 0},
144+
{0, 0, 0, 0}
145145
};
146146

147147
static const te_variable *find_builtin(const char *name, int len) {

0 commit comments

Comments
 (0)