summaryrefslogtreecommitdiff
path: root/Build/source/texk
diff options
context:
space:
mode:
authorHironobu Yamashita <h.y.acetaminophen@gmail.com>2017-12-09 14:00:07 +0000
committerHironobu Yamashita <h.y.acetaminophen@gmail.com>2017-12-09 14:00:07 +0000
commitfb0976eba4285e6fb42abd23bbe2e7a8fbf5563c (patch)
treef79f4a347a4cd76dc3ecd0b1d05306bb32bd9a5d /Build/source/texk
parent227fa7bafe9f9c02eeaa6baef341edcae3b17060 (diff)
tex-glyph.c: avoid compiler warning
git-svn-id: svn://tug.org/texlive/trunk@46024 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r--Build/source/texk/kpathsea/ChangeLog7
-rw-r--r--Build/source/texk/kpathsea/tex-glyph.c7
2 files changed, 12 insertions, 2 deletions
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 <gzjjgod@gmail.com>
+
+ * 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 <karl@freefriends.org>
* 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;