aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-12-23 12:56:47 -0200
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-12-23 13:04:23 -0200
commit71e7fec3421cca2c8d528714012aa35e0e0fcf24 (patch)
treebc1c5fb1b074f47e109b3d795b7ceba3c610dd7f /src
parentdfa0e9d779a1f341937251eaebffe1c720120cfe (diff)
main: get rid of GCC specific pragmas
The pragma GCC diagnostic ignored "-Wdiscarded-qualifiers" doesn't exist in clang. Get rid of it, in order to make the code more portable. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'src')
-rw-r--r--src/main.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/main.c b/src/main.c
index 978876b..6874568 100644
--- a/src/main.c
+++ b/src/main.c
@@ -18,9 +18,6 @@ static int half = 0, use_read = 0, debug = 0;
static gchar *video_dev = NULL;
static int x = 0, y = 0;
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdiscarded-qualifiers"
-
static GOptionEntry options[] = {
{"version", 'V', 0, G_OPTION_ARG_NONE, &ver,
N_("show version and exit"), NULL},
@@ -43,8 +40,6 @@ static GOptionEntry options[] = {
{NULL}
};
-#pragma GCC diagnostic pop
-
static void get_geometry(cam_t *cam)
{
#if GTK_MAJOR_VERSION >= 3 && GTK_MINOR_VERSION >= 22
@@ -202,10 +197,7 @@ static void activate(GtkApplication *app)
if (cam->debug)
printf("Using videodev: %s\n", cam->video_dev);
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdiscarded-qualifiers"
- cam->date_format = "%Y-%m-%d %H:%M:%S";
-#pragma GCC diagnostic pop
+ cam->date_format = (char *) "%Y-%m-%d %H:%M:%S";
cam->pixdir = g_settings_get_string(cam->gc, CAM_SETTINGS_SAVE_DIR);
/* Deal with the save-dir default value starting with "~/" */

Privacy Policy