The existing cast didn't make much sense. The expression itself is already int, there's little point in casting it to int, especially when assigning to a float. This fixes warnings with MSVC.
Showing the changes to test/encoder/EncUT_EncoderExt.cpp (1 of 1 file). Show all
Unified · Split
| @@ -191,7 +191,7 @@ TEST_F (EncoderInterfaceTest, EncoderOptionSetTest) { · 190 unmodified lines | |||
| 191 | pSrcPic->uiTimeStamp += 30; | 191 | pSrcPic->uiTimeStamp += 30; |
| 192 | 192 | ||
| 193 | eOptionId = ENCODER_OPTION_FRAME_RATE; | 193 | eOptionId = ENCODER_OPTION_FRAME_RATE; |
| 194 | fValue = static_cast<int> (rand() % 60 - 5); | 194 | fValue = static_cast<float> (rand() % 60 - 5); |
| 195 | iResult = pPtrEnc->SetOption (eOptionId, &fValue); | 195 | iResult = pPtrEnc->SetOption (eOptionId, &fValue); |
| 196 | 196 | ||
| 197 | if (fValue <= 0) | 197 | if (fValue <= 0) |