summaryrefslogtreecommitdiffstats
path: root/libMpegTPEnc/src
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2013-11-01 11:25:43 +0200
committerMartin Storsjo <martin@martin.st>2013-11-01 11:28:59 +0200
commitc8002b04ff601920c30bded02d8341d298425188 (patch)
treeb707dcbdc8edaa23d8880962d3fcb9e3b3e529d1 /libMpegTPEnc/src
parentb41a6f9e8171ae069b9f2b5ef19292dbee4cecc8 (diff)
downloadODR-AudioEnc-c8002b04ff601920c30bded02d8341d298425188.tar.gz
ODR-AudioEnc-c8002b04ff601920c30bded02d8341d298425188.tar.bz2
ODR-AudioEnc-c8002b04ff601920c30bded02d8341d298425188.zip
Avoid casting arbitrary values to an enum
The enum only contains the constant values 0, 1 and 2. This produces the warning "comparison of constant 6 with expression of type 'PS_RESOLUTION' is always false" in clang for the first check in the getNoBands function (but apparently not for the second one even though mode>=3 shouldn't ever happen for a valid PS_RESOLUTION value either). This could allow the compiler to completely remove the conditions that shouldn't be able to occur even though they actually are used and are necessary. By passing the value as UINT instead, it is clear to the compiler that all the checks are necessary.
Diffstat (limited to 'libMpegTPEnc/src')
0 files changed, 0 insertions, 0 deletions