From 640382c74364f61da36bdc5b1272e8cda28f1d8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Valverde?= Date: Tue, 16 Aug 2016 22:21:59 +0100 Subject: CMake: Allow setting per target compiler warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Setting our compiler warning flags in CMAKE_C_FLAGS does not allow using different flags per target. Allow for that possibility by setting the internal WS_WARNINGS_{C,CXX}_FLAGS and using the COMPILE_OPTIONS property to set them. This change is just setting mechanism and there should be no difference in generated warnings. The check_X_compiler_flag cmake test is changed to test each flag individually. We need a list, not a space separated string, and the aggregate test is not significant. Change-Id: I59fc5cd7e130c7a5e001c598e3df3e13f83a6a25 Reviewed-on: https://code.wireshark.org/review/17150 Petri-Dish: João Valverde Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde --- file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'file.c') diff --git a/file.c b/file.c index f1773697be..30259ce4fe 100644 --- a/file.c +++ b/file.c @@ -3339,7 +3339,7 @@ match_regex(capture_file *cf, frame_data *fdata, void *criterion _U_) return MR_ERROR; } - if (g_regex_match_full(cf->regex, ws_buffer_start_ptr(&cf->buf), fdata->cap_len, + if (g_regex_match_full(cf->regex, (const gchar *)ws_buffer_start_ptr(&cf->buf), fdata->cap_len, 0, (GRegexMatchFlags) 0, &match_info, NULL)) { gint start_pos = 0, end_pos = 0; @@ -4024,7 +4024,7 @@ cf_set_frame_edited(capture_file *cf, frame_data *fd, modified_frame_data *mfd = (modified_frame_data *)g_malloc(sizeof(modified_frame_data)); mfd->phdr = *phdr; - mfd->pd = pd; + mfd->pd = (char *)pd; if (cf->edited_frames == NULL) cf->edited_frames = g_tree_new_full(g_direct_compare_func, NULL, NULL, -- cgit v1.2.1