From: Khaled Hosny Date: Tue, 4 Aug 2015 13:35:47 +0000 (+0200) Subject: Ignore our own deprecations X-Git-Tag: v1.0.0~29^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=be5e07413f1e7bf306ba122f6ffc27a9a9564f29;p=fribidi Ignore our own deprecations --- diff --git a/bin/fribidi-benchmark.c b/bin/fribidi-benchmark.c index 53eeaf1..9a83819 100644 --- a/bin/fribidi-benchmark.c +++ b/bin/fribidi-benchmark.c @@ -218,6 +218,7 @@ benchmark ( { /* Create a bidi string */ base = FRIBIDI_PAR_ON; +FRIBIDI_GNUC_BEGIN_IGNORE_DEPRECATIONS if (!fribidi_log2vis (us, len, &base, /* output */ out_us, positionVtoL, positionLtoV, @@ -225,6 +226,7 @@ benchmark ( die2 ("something failed in fribidi_log2vis.\n" "perhaps memory allocation failure.", NULL); +FRIBIDI_GNUC_END_IGNORE_DEPRECATIONS } /* stop timer */ diff --git a/bin/fribidi-main.c b/bin/fribidi-main.c index d93ccb4..ccdf576 100644 --- a/bin/fribidi-main.c +++ b/bin/fribidi-main.c @@ -376,8 +376,10 @@ main ( #endif /* !FRIBIDI_MAIN_USE_ICONV_H */ die2 ("unrecognized character set `%s'\n", char_set); +FRIBIDI_GNUC_BEGIN_IGNORE_DEPRECATIONS fribidi_set_mirroring (do_mirror); fribidi_set_reorder_nsm (do_reorder_nsm); +FRIBIDI_GNUC_END_IGNORE_DEPRECATIONS exit_val = 0; file_found = false; while (optind < argc || !file_found) @@ -468,9 +470,11 @@ main ( /* Create a bidi string. */ base = input_base_direction; +FRIBIDI_GNUC_BEGIN_IGNORE_DEPRECATIONS log2vis = fribidi_log2vis (logical, len, &base, /* output */ visual, ltov, vtol, levels); +FRIBIDI_GNUC_END_IGNORE_DEPRECATIONS if (log2vis) { @@ -481,9 +485,11 @@ main ( /* Remove explicit marks, if asked for. */ if (do_clean) +FRIBIDI_GNUC_BEGIN_IGNORE_DEPRECATIONS len = fribidi_remove_bidi_marks (visual, len, ltov, vtol, levels); +FRIBIDI_GNUC_END_IGNORE_DEPRECATIONS if (show_visual) { diff --git a/lib/fribidi-common.h b/lib/fribidi-common.h index 6dede39..28cfaa3 100644 --- a/lib/fribidi-common.h +++ b/lib/fribidi-common.h @@ -64,6 +64,8 @@ # define FRIBIDI_END_DECLS G_END_DECLS # define FRIBIDI_GNUC_CONST G_GNUC_CONST # define FRIBIDI_GNUC_DEPRECATED G_GNUC_DEPRECATED +# define FRIBIDI_GNUC_BEGIN_IGNORE_DEPRECATIONS G_GNUC_BEGIN_IGNORE_DEPRECATIONS +# define FRIBIDI_GNUC_END_IGNORE_DEPRECATIONS G_GNUC_END_IGNORE_DEPRECATIONS # if __GNUC__ > 2 # define FRIBIDI_GNUC_WARN_UNUSED \ __attribute__((__warn_unused_result__)) @@ -79,6 +81,8 @@ #else /* !FRIBIDI_USE_GLIB */ # define FRIBIDI_GNUC_CONST # define FRIBIDI_GNUC_DEPRECATED +# define FRIBIDI_GNUC_BEGIN_IGNORE_DEPRECATIONS +# define FRIBIDI_GNUC_END_IGNORE_DEPRECATIONS # define FRIBIDI_GNUC_WARN_UNUSED # define FRIBIDI_GNUC_MALLOC # define FRIBIDI_GNUC_HIDDEN