Fix C++ compile

This commit is contained in:
Shahram Najm 2019-01-21 18:05:01 +00:00
parent 22cc27ef1b
commit a315256dbe
3 changed files with 4 additions and 7 deletions

View File

@ -52,9 +52,7 @@ struct accessor_class_hash { char *name; grib_accessor_class **cclass;};
#endif
#endif
static unsigned int
grib_accessor_classes_get_id (str, len)
register const char *str;
register unsigned int len;
grib_accessor_classes_get_id (const char *str, unsigned int len)
{
static const unsigned short asso_values[] =
{

View File

@ -51,9 +51,7 @@ struct grib_keys_hash { char* name; int id;};
#endif
#endif
static unsigned int
hash_keys (str, len)
register const char *str;
register unsigned int len;
hash_keys (const char *str, unsigned int len)
{
static const unsigned short asso_values[] =
{

View File

@ -1408,11 +1408,12 @@ static void my_assertion_proc(const char* message)
static void test_assertion_catching()
{
char empty[]="";
assert(assertion_caught == 0);
codes_set_codes_assertion_failed_proc(&my_assertion_proc);
/* Do something illegal */
string_split("", " ");
string_split(empty, " ");
assert(assertion_caught == 1);