diff options
author | Dan McGee <dan@archlinux.org> | 2011-01-07 21:06:06 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-01-07 21:15:47 -0600 |
commit | 62f5da377920c4e7823c4f8b8fb3673c9c2739e9 (patch) | |
tree | 3496e43e7161e765680daac4f0f56efe1dae754b /lib/libalpm/deps.c | |
parent | f966f3a8344cd96bd675c79a5c470c66920b890c (diff) | |
download | pacman-62f5da377920c4e7823c4f8b8fb3673c9c2739e9.tar.xz |
Fix some more simple conversion "errors"
None of these warn at the normal "-Wall -Werror" level, but casts do occur
that we are fine with. Make them explicit to silence some warnings when
using "-Wconversion".
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/deps.c')
-rw-r--r-- | lib/libalpm/deps.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c index 1bf2e87f..3d4b1df4 100644 --- a/lib/libalpm/deps.c +++ b/lib/libalpm/deps.c @@ -350,8 +350,9 @@ int _alpm_depcmp(pmpkg_t *pkg, pmdepend_t *dep) /* This is a bit tricker than the old code for performance reasons. To * prevent the need to copy and duplicate strings, strncmp only the name * portion if they are the same length, since there is a version and - * operator in play here. */ - size_t namelen = provver - provision; + * operator in play here. Cast is to silence sign conversion warning; + * we know provver >= provision if we are here. */ + size_t namelen = (size_t)(provver - provision); provver += 1; satisfy = (strlen(dep->name) == namelen && strncmp(provision, dep->name, namelen) == 0 |