Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/deps.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/deps.c')
-rw-r--r--lib/libalpm/deps.c5
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