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
153 stars 70 forks source link

mount_starbook: fix crash on warning place #518

Closed tail-feather closed 10 months ago

tail-feather commented 10 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().