Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Apr 2017 21:02:00 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r317216 - head/lib/libthread_db
Message-ID:  <201704202102.v3KL20O2097354@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Thu Apr 20 21:01:59 2017
New Revision: 317216
URL: https://svnweb.freebsd.org/changeset/base/317216

Log:
  libthread_db: unbreak build due to sign/unsigned comparison.
  
  Reported by:	lwshu

Modified:
  head/lib/libthread_db/libpthread_db.c

Modified: head/lib/libthread_db/libpthread_db.c
==============================================================================
--- head/lib/libthread_db/libpthread_db.c	Thu Apr 20 21:00:09 2017	(r317215)
+++ head/lib/libthread_db/libpthread_db.c	Thu Apr 20 21:01:59 2017	(r317216)
@@ -227,7 +227,7 @@ pt_ta_map_id2thr(const td_thragent_t *ta
 
 	TDBG_FUNC();
 
-	if (id < 0 || id >= ta->map_len || ta->map[id].type == PT_NONE)
+	if (id < 0 || id >= (long)ta->map_len || ta->map[id].type == PT_NONE)
 		return (TD_NOTHR);
 
 	ret = thr_pread_ptr(ta, ta->thread_list_addr, &pt);
@@ -1062,7 +1062,7 @@ static int
 pt_validate(const td_thrhandle_t *th)
 {
 
-	if (th->th_tid < 0 || th->th_tid >= th->th_ta->map_len ||
+	if (th->th_tid < 0 || th->th_tid >= (long)th->th_ta->map_len ||
 	    th->th_ta->map[th->th_tid].type == PT_NONE)
 		return (TD_NOTHR);
 	return (TD_OK);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704202102.v3KL20O2097354>