[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apt: have to specify www port in sources.list on alpha



The relevent code is in methods/http/http.cc line 561 ish

   int Port = 80;
   unsigned int I = Host.rfind(':');
   if (I != string::npos)
   {
      Port = atoi(string(Host,I+1).c_str());
      Host = string(Host,0,I);
   }    

Now, the only way the port can go to zero is if Host.rfind() returns
something other than string::npos. 

What I am thinking is that unsigned int is not large enough to be a string
iterator and that it should be changed to be string::size_type - can you
try this?

Also, why doesn't G++ warn about this? Can someone who has compiled this
on alpha send me a list of all the warnings - be sure to compile with
-Wall.

Apt compiles (almost) warning free on i386, and warning, on any arch is a
bug. There is a glitch in glibc regarding mmap, they have the wrong
prototype and the compiler warns on that.

Jason


--
To UNSUBSCRIBE, email to debian-alpha-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: