texlive[46024] Build/source/texk/kpathsea: tex-glyph.c: avoid
commits+hironobu at tug.org
commits+hironobu at tug.org
Sat Dec 9 15:00:08 CET 2017
Revision: 46024
http://tug.org/svn/texlive?view=revision&revision=46024
Author: hironobu
Date: 2017-12-09 15:00:07 +0100 (Sat, 09 Dec 2017)
Log Message:
-----------
tex-glyph.c: avoid compiler warning
Modified Paths:
--------------
trunk/Build/source/texk/kpathsea/ChangeLog
trunk/Build/source/texk/kpathsea/tex-glyph.c
Modified: trunk/Build/source/texk/kpathsea/ChangeLog
===================================================================
--- trunk/Build/source/texk/kpathsea/ChangeLog 2017-12-09 01:18:00 UTC (rev 46023)
+++ trunk/Build/source/texk/kpathsea/ChangeLog 2017-12-09 14:00:07 UTC (rev 46024)
@@ -1,3 +1,10 @@
+2017-12-09 Jiang Jiang <gzjjgod at 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 at freefriends.org>
* tex-file.c (kpathsea_init_format_return_varlist)
Modified: trunk/Build/source/texk/kpathsea/tex-glyph.c
===================================================================
--- trunk/Build/source/texk/kpathsea/tex-glyph.c 2017-12-09 01:18:00 UTC (rev 46023)
+++ trunk/Build/source/texk/kpathsea/tex-glyph.c 2017-12-09 14:00:07 UTC (rev 46024)
@@ -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 @@
/* 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;
More information about the tex-live-commits
mailing list