Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8583
[metze/wireshark/wip.git] / editcap.c
index 2d4b18ef5e58f5344f8ea4ef327d762a9c06df8d..3332d5df6aaff02dafc741d3806e58c2c220f2ae 100644 (file)
--- a/editcap.c
+++ b/editcap.c
@@ -814,7 +814,7 @@ list_encap_types(void) {
     struct string_elem *encaps;
     GSList *list = NULL;
 
-    encaps = g_malloc(sizeof(struct string_elem) * WTAP_NUM_ENCAP_TYPES);
+    encaps = (struct string_elem *)g_malloc(sizeof(struct string_elem) * WTAP_NUM_ENCAP_TYPES);
     fprintf(stderr, "editcap: The available encapsulation types for the \"-T\" flag are:\n");
     for (i = 0; i < WTAP_NUM_ENCAP_TYPES; i++) {
         encaps[i].sstr = wtap_encap_short_string(i);