From fb0976eba4285e6fb42abd23bbe2e7a8fbf5563c Mon Sep 17 00:00:00 2001 From: Hironobu Yamashita Date: Sat, 9 Dec 2017 14:00:07 +0000 Subject: tex-glyph.c: avoid compiler warning git-svn-id: svn://tug.org/texlive/trunk@46024 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/kpathsea/ChangeLog | 7 +++++++ Build/source/texk/kpathsea/tex-glyph.c | 7 +++++-- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'Build') diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog index 7aa64cbd8f0..b471f7ea666 100644 --- a/Build/source/texk/kpathsea/ChangeLog +++ b/Build/source/texk/kpathsea/ChangeLog @@ -1,3 +1,10 @@ +2017-12-09 Jiang Jiang + + * tex-glyph.c (try_fallback_resolutions): + Avoid warning: taking the absolute value of unsigned type + 'unsigned int' has no effect [-Wabsolute-value] + ref. https://github.com/jjgod/texlive/commit/4cbec4c + 2017-12-08 Karl Berry * tex-file.c (kpathsea_init_format_return_varlist) diff --git a/Build/source/texk/kpathsea/tex-glyph.c b/Build/source/texk/kpathsea/tex-glyph.c index 79b27f606f5..c98a17edf47 100644 --- a/Build/source/texk/kpathsea/tex-glyph.c +++ b/Build/source/texk/kpathsea/tex-glyph.c @@ -1,6 +1,6 @@ /* tex-glyph.c: search for GF/PK files. - Copyright 1993, 1994, 1995, 1996, 2008, 2009, 2011 Karl Berry. + Copyright 1993, 1994, 1995, 1996, 2008, 2009, 2011, 2017 Karl Berry. Copyright 1997, 1998, 1999, 2005 Olaf Weber. This library is free software; you can redistribute it and/or @@ -201,7 +201,10 @@ try_fallback_resolutions (kpathsea kpse, /* First find the fallback size closest to DPI, even including DPI. */ for (s = 0; kpse->fallback_resolutions[s] != 0; s++) { - unsigned this_diff = abs (kpse->fallback_resolutions[s] - dpi); + unsigned this_diff = + kpse->fallback_resolutions[s] > dpi + ? kpse->fallback_resolutions[s] - dpi + : dpi - kpse->fallback_resolutions[s]; if (this_diff < closest_diff) { closest_diff = this_diff; -- cgit v1.2.3