Two loops in librpc/gen_hdr/ndr_drsblobs.c routine ndr_push_package_PrimaryKerberosCtr4 compile with warning cc-1183 (unsigned compared to zero). Why is the upper limit of both loops zero (lines 1871 and 1886)? This is the first of two similar loops: for (cntr_service_keys_0 = 0; cntr_service_keys_0 < 0; cntr_service_keys_0++) { NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, &r->service_keys[cntr_service_keys_0])); }
The counter (num_service_keys) for field service_keys has a value(0) attribute in the drsblobs.idl file (line 308). Does this mean that variable num_service_keys is always zero and can never take a non-zero value? I guess this looping code is OK assuming the loop termination condition is supposed to be 0 and not r->num_service_keys. The same applies for the earlier push of 0 instead of the r->num_service_keys variable.
Pidl will now no longer generate these loops but instead warn the user when compiling the IDL file.