patrickfrey / strusAnalyzer

Library for document analysis (segmentation, tokenization, normalization, aggregation) with the goal to get a set of items that can be inserted into a strus storage. Also some functions for analysing tokens or phrases of the strus query are provided.
http://www.project-strus.net
Mozilla Public License 2.0
3 stars 0 forks source link

cJSON library throws some warnings #18

Closed andreasbaumann closed 8 years ago

andreasbaumann commented 8 years ago
[ 87%] Building C object 3rdParty/cjson/src/CMakeFiles/cjson.dir/cJSON.c.o
/home/abaumann/projects/strus/strusAnalyzer/3rdParty/cjson/src/cJSON.c: In function ‘cJSON_strcasecmp’:
/home/abaumann/projects/strus/strusAnalyzer/3rdParty/cjson/src/cJSON.c:37:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  if (!s1) return (s1==s2)?0:1;if (!s2) return 1;
  ^~
/home/abaumann/projects/strus/strusAnalyzer/3rdParty/cjson/src/cJSON.c:37:31: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
  if (!s1) return (s1==s2)?0:1;if (!s2) return 1;
                               ^~
/home/abaumann/projects/strus/strusAnalyzer/3rdParty/cjson/src/cJSON.c: In function ‘print_object’:
/home/abaumann/projects/strus/strusAnalyzer/3rdParty/cjson/src/cJSON.c:480:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
   if (fmt) *ptr++='\n';*ptr=0;
   ^~
/home/abaumann/projects/strus/strusAnalyzer/3rdParty/cjson/src/cJSON.c:480:24: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
   if (fmt) *ptr++='\n';*ptr=0;
                        ^
/home/abaumann/projects/strus/strusAnalyzer/3rdParty/cjson/src/cJSON.c: In function ‘cJSON_DetachItemFromArray’:
/home/abaumann/projects/strus/strusAnalyzer/3rdParty/cjson/src/cJSON.c:507:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  if (c->prev) c->prev->next=c->next;if (c->next) c->next->prev=c->prev;if (c==array->child) array->child=c->next;c->prev=c->next=0;return c;}
  ^~
/home/abaumann/projects/strus/strusAnalyzer/3rdParty/cjson/src/cJSON.c:507:37: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
  if (c->prev) c->prev->next=c->next;if (c->next) c->next->prev=c->prev;if (c==array->child) array->child=c->next;c->prev=c->next=0;return c;}
                                     ^~
[ 87%] Linking C static library libcjson.a
[ 87%] Built target cjson
patrickfrey commented 8 years ago

Fixed (I think)

andreasbaumann commented 8 years ago

Checked. They have gone.