libimcv: Cast chunk length to int when printing as string
authorTobias Brunner <tobias@strongswan.org>
Tue, 8 Aug 2017 13:32:08 +0000 (15:32 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 8 Aug 2017 13:32:08 +0000 (15:32 +0200)
src/libimcv/plugins/imv_swid/imv_swid_state.c
src/libimcv/swid/swid_inventory.c

index 2b270b8..50e9f48 100644 (file)
@@ -301,7 +301,8 @@ METHOD(imv_swid_state_t, set_swid_inventory, void,
                tag_creator = tag_id->get_tag_creator(tag_id);
                sw_id = tag_id->get_unique_sw_id(tag_id, NULL);
                snprintf(software_id, BUF_LEN, "%.*s__%.*s",
-                                tag_creator.len, tag_creator.ptr, sw_id.len, sw_id.ptr);
+                                (int)tag_creator.len, tag_creator.ptr,
+                                (int)sw_id.len, sw_id.ptr);
                DBG3(DBG_IMV, "  %s", software_id);
 
                /* Add software ID to JSON array */
index 4adbb39..5f6e50c 100644 (file)
@@ -125,7 +125,8 @@ static status_t generate_tags(private_swid_inventory_t *this,
                        tag_creator  = tag_id->get_tag_creator(tag_id);
                        sw_id = tag_id->get_unique_sw_id(tag_id, NULL);
                        snprintf(software_id, BUF_LEN, "%.*s__%.*s",
-                                        tag_creator.len, tag_creator.ptr, sw_id.len, sw_id.ptr);
+                                        (int)tag_creator.len, tag_creator.ptr,
+                                        (int)sw_id.len, sw_id.ptr);
 
                        swid_tag = swid_gen->generate_tag(swid_gen, software_id, NULL, NULL,
                                                                                 full, pretty);