[AGENT++] SNMP++, address.h warning on VC++ 6

Caminati Carlo C.Caminati at selta.it
Thu Apr 5 15:53:40 CEST 2012


Hello

Compiling SNMP++v3.2.24 with MS Visual C++ 6

The compiler gives a warning (each time you include the file) about 

truncating from int to unsigned char at line 252

 

unsigned char operator[](const int position) const

    { return (position < ADDRBUF) ? address_buffer[ position] : 0; }

 

adding a cast before '0' the warning disappears also on this compiler

 

unsigned char operator[](const int position) const

    { return (position < ADDRBUF) ? address_buffer[ position] :
(unsigned char)0; }

 

consider adding this change to next version

 

thanks

 

Carlo



More information about the AGENTPP mailing list