|
|
Created:
5 years, 4 months ago by Mostyn Bramley-Moore Modified:
5 years, 4 months ago CC:
chromium-reviews, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, jam, darin-cc_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
Descriptionconvince gcc that cpu_used et al are always initialized
Without this, gcc thinks that min_quantizer, max_quantizer and cpu_used
are used uninitialized and emits a warning which is promoted to an error.
BUG=455409
TBR=bbudge
Committed: https://crrev.com/2dc24b537c4fda93db4148c3f5d30bcaea5147d8
Cr-Commit-Position: refs/heads/master@{#342214}
Patch Set 1 #
Total comments: 1
Patch Set 2 : just zero values #Messages
Total messages: 22 (9 generated)
mostynb@opera.com changed reviewers: + bbudge@chromium.org, lionel.g.landwerlin@intel.com
@bbudge: PTAL at this gcc fixup for https://codereview.chromium.org/1132833002. Without this, gcc gives the following warnings which are promoted to errors: In file included from ../../content/renderer/pepper/video_encoder_shim.cc:20:0: ../../third_party/libvpx/source/libvpx/vpx/vp8cx.h: In member function ‘void content::VideoEncoderShim::EncoderImpl::Initialize(media::VideoPixelFormat, const gfx::Size&, media::VideoCodecProfile, uint32)’: ../../third_party/libvpx/source/libvpx/vpx/vp8cx.h:678:262: error: ‘cpu_used’ may be used uninitialized in this function [-Werror=maybe-uninitialized] VPX_CTRL_USE_TYPE(VP8E_SET_CPUUSED, int) ^ ../../content/renderer/pepper/video_encoder_shim.cc:161:41: note: ‘cpu_used’ was declared here int32_t min_quantizer, max_quantizer, cpu_used; ^ ../../content/renderer/pepper/video_encoder_shim.cc:181:43: error: ‘max_quantizer’ may be used uninitialized in this function [-Werror=maybe-uninitialized] config_.rc_max_quantizer = max_quantizer; ^ ../../content/renderer/pepper/video_encoder_shim.cc:180:43: error: ‘min_quantizer’ may be used uninitialized in this function [-Werror=maybe-uninitialized] config_.rc_min_quantizer = min_quantizer; ^ cc1plus: all warnings being treated as errors
Looks good to me, but I'm not an owner. Out of curiousity, is it with gcc 5? Thanks! On 2015/08/06 06:31:21, Mostyn Bramley-Moore wrote: > @bbudge: PTAL at this gcc fixup for https://codereview.chromium.org/1132833002. > > Without this, gcc gives the following warnings which are promoted to errors: > > In file included from ../../content/renderer/pepper/video_encoder_shim.cc:20:0: > ../../third_party/libvpx/source/libvpx/vpx/vp8cx.h: In member function ‘void > content::VideoEncoderShim::EncoderImpl::Initialize(media::VideoPixelFormat, > const gfx::Size&, media::VideoCodecProfile, uint32)’: > ../../third_party/libvpx/source/libvpx/vpx/vp8cx.h:678:262: error: ‘cpu_used’ > may be used uninitialized in this function [-Werror=maybe-uninitialized] > VPX_CTRL_USE_TYPE(VP8E_SET_CPUUSED, int) > > > > ^ > ../../content/renderer/pepper/video_encoder_shim.cc:161:41: note: ‘cpu_used’ was > declared here > int32_t min_quantizer, max_quantizer, cpu_used; > ^ > ../../content/renderer/pepper/video_encoder_shim.cc:181:43: error: > ‘max_quantizer’ may be used uninitialized in this function > [-Werror=maybe-uninitialized] > config_.rc_max_quantizer = max_quantizer; > ^ > ../../content/renderer/pepper/video_encoder_shim.cc:180:43: error: > ‘min_quantizer’ may be used uninitialized in this function > [-Werror=maybe-uninitialized] > config_.rc_min_quantizer = min_quantizer; > ^ > cc1plus: all warnings being treated as errors
On 2015/08/06 09:57:14, llandwerlin wrote: > Looks good to me, but I'm not an owner. > Out of curiousity, is it with gcc 5? I'm using gcc 4.8.4.
The CQ bit was checked by mostynb@opera.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1276633004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1276633004/1
bbudge@google.com changed reviewers: + bbudge@google.com
lgtm w/comment https://codereview.chromium.org/1276633004/diff/1/content/renderer/pepper/vid... File content/renderer/pepper/video_encoder_shim.cc (right): https://codereview.chromium.org/1276633004/diff/1/content/renderer/pepper/vid... content/renderer/pepper/video_encoder_shim.cc:82: *cpu_used = kVp9DefaultCpuUsed; nit: Just zero them to make it clear this is an error case.
On 2015/08/06 12:26:26, bbudge-google wrote: > nit: Just zero them to make it clear this is an error case. Done- thanks.
The CQ bit was checked by mostynb@opera.com
The patchset sent to the CQ was uploaded after l-g-t-m from bbudge@google.com Link to the patchset: https://codereview.chromium.org/1276633004/#ps20001 (title: "just zero values")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1276633004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1276633004/20001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...)
The CQ bit was checked by mostynb@opera.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1276633004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1276633004/20001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
The CQ bit was checked by mostynb@opera.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1276633004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1276633004/20001
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/2dc24b537c4fda93db4148c3f5d30bcaea5147d8 Cr-Commit-Position: refs/heads/master@{#342214} |