indigo-astronomy / indigo

INDIGO is a system of standards and frameworks for multiplatform and distributed astronomy software development designed to scale with your needs.
http://www.indigo-astronomy.org
Other
139 stars 64 forks source link

mount_starbook: fix crash on warning place #518

Closed tail-feather closed 5 months ago

tail-feather commented 5 months ago

Currently the starbook driver is crashing.

indigo_mount_starbook.c:317:21: warning: implicit declaration of function ‘strcasestr’; did you mean ‘strcasecmp’? [-Wimplicit-function-declaration]
  317 |         char *beg = strcasestr(temp, "<!--");
      |                     ^~~~~~~~~~
      |                     strcasecmp
indigo_mount_starbook.c:317:21: warning: initialization of ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]

I think strcasecmp() is being called.

The strcasestr() function is a non-standard extension. So I change from strcasestr() to strstr().