snmp plugin: Don't print a warning if the ASN type is "ASN_NULL".
[collectd.git] / src / snmp.c
index 00df377..96a0971 100644 (file)
@@ -752,6 +752,13 @@ static value_t csnmp_value_list_to_value (struct variable_list *vl, int type,
   {
     /* We'll handle this later.. */
   }
+#ifdef ASN_NULL
+  else if (vl->type == ASN_NULL)
+  {
+    /* Don't print a warning. */
+    defined = 0;
+  }
+#endif
   else
   {
     WARNING ("snmp plugin: I don't know the ASN type `%i'", (int) vl->type);
@@ -1127,7 +1134,7 @@ static int csnmp_dispatch_table (host_definition_t *host, data_definition_t *dat
       char temp[DATA_MAX_NAME_LEN];
 
       if (instance_list_ptr == NULL)
-       ssnprintf (temp, sizeof (temp), "%u", (uint32_t) subid);
+       ssnprintf (temp, sizeof (temp), "%"PRIu32, (uint32_t) subid);
       else
        sstrncpy (temp, instance_list_ptr->instance, sizeof (temp));