Text   |  XML   |  ReML   |   Visible Warnings:

Ignored Return Value  at print.c:1477

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

proto_tree_write_fields

(/home/sate/Testcases/c/cve/wireshark-1.2.0/print.c)expand/collapse
Show more  
 1433  void proto_tree_write_fields(output_fields_t* fields, epan_dissect_t *edt, FILE *fh)
 1434  {
 1435      gsize i;
 1436   
 1437      write_field_data_t data;
 1438   
 1439      g_assert(fields);
 1440      g_assert(edt);
 1441      g_assert(fh);
 1442   
 1443      data.fields = fields;
 1444      data.edt = edt;
 1445   
 1446      if(NULL == fields->field_indicies) {
 1447          /* Prepare a lookup table from string abbreviation for field to its index. */
 1448          fields->field_indicies = g_hash_table_new(g_str_hash, g_str_equal);
 1449   
 1450          i = 0;
 1451          while( i < fields->fields->len) {
 1452              gchar* field = g_ptr_array_index(fields->fields, i);
 1453               /* Store field indicies +1 so that zero is not a valid value,
 1454                * and can be distinguished from NULL as a pointer.
 1455                */
 1456              ++i;
 1457              g_hash_table_insert(fields->field_indicies, field, GUINT_TO_POINTER(i));
 1458          }
 1459      }
 1460   
 1461      /* Buffer to store values for this packet */
 1462      fields->field_values = ep_alloc_array0(const gchar*, fields->fields->len);
 1463   
 1464      proto_tree_children_foreach(edt->tree, proto_tree_get_node_field_values,
 1465                                  &data);
 1466   
 1467      for(i = 0; i < fields->fields->len; ++i) {
 1468          if(0 != i) {
 1469              fputc(fields->separator, fh);
 1470          }
 1471          if(NULL != fields->field_values[i]) {
 1472              if(fields->quote != '\0') {
 1473                  fputc(fields->quote, fh);
 1474              }
 1475              fputs(fields->field_values[i], fh);
 1476              if(fields->quote != '\0') {
 1477                  fputc(fields->quote, fh);
 1478              }
 1479          }
 1480      }
 1481  }
Show more  




Change Warning 5536.35812 : Ignored Return Value

Because they are very similar, this warning shares annotations with warning 5536.35813.

Priority:
State:
Finding:
Owner:
Note: