num -= offset;
- if ((length == 0) || (length > num)) length=(unsigned int)num;
+ if ((length == 0) || ((long)length > num)) length=(unsigned int)num;
if(derout) {
if(BIO_write(derout, str + offset, length) != (int)length) {
BIO_printf(bio_err, "Error writing output\n");
/* If OBJ not recognised ignore it */
if ((nid=OBJ_txt2nid(type)) == NID_undef) goto start;
if (BIO_snprintf(buf,sizeof buf,"%s_default",v->name)
- >= sizeof buf)
+ >= (int)sizeof(buf))
{
BIO_printf(bio_err,"Name '%s' too long\n",v->name);
return 0;
goto start2;
if (BIO_snprintf(buf,sizeof buf,"%s_default",type)
- >= sizeof buf)
+ >= (int)sizeof(buf))
{
BIO_printf(bio_err,"Name '%s' too long\n",v->name);
return 0;