mirror of
https://github.com/DaveGamble/cJSON.git
synced 2026-11-06 15:51:31 +00:00
Add -Wdouble-promotion compiler flag
This commit is contained in:
1 parent
40e3781e9b
commit
3f349a4258
2 files changed
+2
-1
No files matched your search
@@ -41,6 +41,7 @@ if (ENABLE_CUSTOM_COMPILER_FLAGS)
|
|||||||
-Wc++-compat
|
-Wc++-compat
|
||||||
-fstack-protector-strong
|
-fstack-protector-strong
|
||||||
-Wcomma
|
-Wcomma
|
||||||
|
-Wdouble-promotion
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@@ -1914,7 +1914,7 @@ CJSON_PUBLIC(cJSON *) cJSON_CreateFloatArray(const float *numbers, int count)
|
|||||||
|
|
||||||
for(i = 0; a && (i < (size_t)count); i++)
|
for(i = 0; a && (i < (size_t)count); i++)
|
||||||
{
|
{
|
||||||
n = cJSON_CreateNumber(numbers[i]);
|
n = cJSON_CreateNumber((double)numbers[i]);
|
||||||
if(!n)
|
if(!n)
|
||||||
{
|
{
|
||||||
cJSON_Delete(a);
|
cJSON_Delete(a);
|
||||||
|
|||||||
Reference in new issue
Block a user