snmp_agent: Try to fix tests
authorPavel Rochnyack <pavel2000@ngs.ru>
Tue, 19 Jun 2018 08:25:06 +0000 (15:25 +0700)
committerPavel Rochnyack <pavel2000@ngs.ru>
Tue, 19 Jun 2018 08:25:06 +0000 (15:25 +0700)
This adressed to fix Solaris 10 builds.

Closes: #2814

src/snmp_agent_test.c

index 68389fa..20537dd 100644 (file)
@@ -663,9 +663,9 @@ DEF_TEST(get_token) {
 }
 
 DEF_TEST(tokenize) {
-  regmatch_t m[3] = {{5, 6},    /* "1" */
-                     {12, 13},  /* "2" */
-                     {19, 20}}; /* "3" */
+  regmatch_t m[3] = {{(regoff_t)5, (regoff_t)6},    /* "1" */
+                     {(regoff_t)12, (regoff_t)13},  /* "2" */
+                     {(regoff_t)19, (regoff_t)20}}; /* "3" */
   c_avl_tree_t *tokens =
       c_avl_create((int (*)(const void *, const void *))num_compare);
   const char input[] = "testA1-testB2-testC3";