Fix building with --enable-debug

Numerous warnings had snuck into the build, preventing ltrace from
building with --enable-debug (which uses -Wall, -Werror, and more).
This patch fixes the problems, mostly caused by -Wsign-compare.

Signed-off-by: Zachary T Welch <zwelch@codesourcery.com>
diff --git a/sysdeps/linux-gnu/proc.c b/sysdeps/linux-gnu/proc.c
index 642cb32..3c17e1f 100644
--- a/sysdeps/linux-gnu/proc.c
+++ b/sysdeps/linux-gnu/proc.c
@@ -143,7 +143,7 @@
 
 static void
 linkmap_add_cb(void *data) { //const char *lib_name, ElfW(Addr) addr) {
-	int i = 0;
+	size_t i = 0;
 	struct cb_data *lm_add = data;
 	struct ltelf lte;
 	struct opt_x_t *xptr;
@@ -252,13 +252,13 @@
 
 int
 linkmap_init(Process *proc, struct ltelf *lte) {
-	void *dbg_addr = NULL;
+	void *dbg_addr = NULL, *dyn_addr = (void *)(unsigned)lte->dyn_addr;
 	struct r_debug *rdbg = NULL;
 	struct cb_data data;
 
 	debug(DEBUG_FUNCTION, "linkmap_init()");
 
-	if (find_dynamic_entry_addr(proc, (void *)lte->dyn_addr, DT_DEBUG, &dbg_addr) == -1) {
+	if (find_dynamic_entry_addr(proc, dyn_addr, DT_DEBUG, &dbg_addr) == -1) {
 		debug(2, "Couldn't find debug structure!");
 		return -1;
 	}