Page MenuHome

Logging: changed printf statements to clog
Needs ReviewPublic

Authored by Andrew Williams (sobakasu) on Jan 29 2019, 4:59 AM.

Diff Detail

rB Blender
arcpatch-D4277_1 (branched from master)
Build Status
Buildable 2824
Build 2824: arc lint + arc unit

Event Timeline

Andrew Williams (sobakasu) marked 2 inline comments as done.Jan 29 2019, 5:13 AM
Andrew Williams (sobakasu) added inline comments.

sorry about this random code change, I got bored


this is my favourite error message

  • Don't reorder includes (strict defines need to be last, else inlines error on Linux).
  • Remove logging for command line argument handling (regular printing is appropriate here).
  • Applied fixes to macros to master (rB68ae1f4958e24906992a3207726c0031de9524b5)
This revision was not accepted when it landed; it landed in state Needs Review.Jan 29 2019, 7:42 AM
This revision was automatically updated to reflect the committed changes.
Campbell Barton (campbellbarton) added inline comments.

Don't re-order headers, it's unrelated to your patch and causes the patch to fail here.

source/blender/gpu/GPU_vertex_buffer.h:117:35: error: conversion from 'long int' to 'uint' {aka 'unsigned int'} may change value [-Werror=conversion]
  return ((a->data - a->data_init) / a->stride);
cc1: all warnings being treated as errors

Update diff against master

Regarding this patch in general,

  • Sometimes developers added prints into the code where they could be asserts, eg: This should never happen.
  • Other times the messages should be shown to the user via reports, eg: render_result_exr_file_read_path.

There are many urgent bugs to fix in 2.8x, while some of the edits in this patch can be applied as-is.

There are other areas where we should reconsider error messages (render pipeline for eg).

Applied nearly all the blenkernel changes rB552b2287db86ed6e77565672fbccff1d553f823f

Use CLOG_ERROR instead of CLOG_FATAL since behavior is slightly different to BLI_assert.

  • Merge branch 'master' into arcpatch-D4277_1