Created attachment 150453 [details] Fix --- /wrkdirs/usr/ports/games/openttd/work/openttd-1.4.4/src/fontcache.cpp:530:15: error: no matching function for call to 'max' int width = max(1, slot->bitmap.width + (this->fs == FS_NORMAL)); ^~~ /wrkdirs/usr/ports/games/openttd/work/openttd-1.4.4/src/core/math_func.hpp:38:17: note: candidate template ignored: deduced conflicting types for parameter 'T' ('int' vs. 'unsigned int') static inline T max(const T a, const T b) ^ /wrkdirs/usr/ports/games/openttd/work/openttd-1.4.4/src/fontcache.cpp:531:15: error: no matching function for call to 'max' int height = max(1, slot->bitmap.rows + (this->fs == FS_NORMAL)); ^~~ /wrkdirs/usr/ports/games/openttd/work/openttd-1.4.4/src/core/math_func.hpp:38:17: note: candidate template ignored: deduced conflicting types for parameter 'T' ('int' vs. 'unsigned int') static inline T max(const T a, const T b) ^ --- Fix attached. If you commit this yourself, don't forget to MFH.
Auto-assigned to maintainer danfe@FreeBSD.org
> Fix attached. Are you sure your patch is correct? It does not seem to help on 10.1 at least (with Clang). The following does, however: - int width = max(1, slot->bitmap.width + (this->fs == FS_NORMAL)); - int height = max(1, slot->bitmap.rows + (this->fs == FS_NORMAL)); + int width = max(1U, slot->bitmap.width + (this->fs == FS_NORMAL)); + int height = max(1U, slot->bitmap.rows + (this->fs == FS_NORMAL)); > If you commit this yourself, don't forget to MFH. If you mean the quarterly branch, sorry, I don't consider merging (I don't run them, so I cannot validate or test any stability issues with ports there, nor do I have them checked out). The way they are currently being done is wrong. Stable branches should be maintained by a dedicated group of people, knowing the branch around, etc. They (and only them) should be doing all the MFHs, not some random committers.
> Are you sure your patch is correct? It does not seem to help on 10.1 at least (with Clang). Yes. That fixes build in all jails in my poudriere. > The following does, however: It is essentially the same. 1U does the thing which exists in both patches, my also changes variable tyoe to unsigned just for consistency (it's used as unsigned later and stored in unsigned field of other object). > If you mean the quarterly branch, sorry, I don't consider merging (I don't run them, so I cannot validate or test any stability issues with ports there, nor do I have them checked out). You don't need to check out quarterly branch to do an MFH. Validation may also be skipped I believe, since merges are simple small fixes. > The way they are currently being done is wrong. Stable branches should be maintained by a dedicated group of people, knowing the branch around, etc. They (and only them) should be doing all the MFHs, not some random committers. Well, there is a group, ports-secteam@. However, they only approve merges, not merge themselves. I agree it would be better to make them do actual merges, however I see that as an improvement above current situation, not a prerequisite to use stable branches. Not merging because of your opinion is not going to move the project forward.
> Yes. That fixes build in all jails in my poudriere. > It is essentially the same. 1U does the thing which exists in both patches, Ah, I see; sorry, I didn't notice you also had 1U when converting your patch into REINPLACE_CMD. Since your patch seems to be more technically correct, I think it should be upstreamed. For a quick fix in ports, sed(1) should do just fine. > [...] Not merging because of your opinion is not going to move the project forward. OK, I will reconsider; thank you for your input.
A commit references this bug: Author: danfe Date: Thu Dec 11 10:10:57 UTC 2014 New revision: 374519 URL: https://svnweb.freebsd.org/changeset/ports/374519 Log: Unbreak the build against new freetype2 (v2.5.4). This is sed(1) version of submitted patch; it is slightly less accurate, but functionally equivalent. PR: 195869 Submitted by: amdmi3 Changes: head/games/openttd/Makefile
> I think it should be upstreamed Sure, I'm working on this right now. Thanks!
> OK, I will reconsider; thank you for your input. JFYI you just need to add MFH: 2014Q4 header to the commit (or ask approval to merge specific revision from ports-secteam@ directly if you forgot the header). Another bonus is that you'll stop getting pkg-fallout mail. Actually, me too, since I'm monitoring fallout for games/* ports.
The fix was upstreamed.
Closing; MHF is no longer needed as we now have 2015Q1 which incorporates this fix.