Advance null check to before cast

Otherwise, clang analyzer thought dfunc could be nil

Change-Id: I443c31efbe38a300173ba75c739d4ab8d350abef
Fix possible null deref of ‘dsa’

Made similar to other already existing checks.

Change-Id: I609db5905bd8c5c2ec77bf46c888bbcf7d3f6226
Added vtkErrorMacro to code paths that give null ptrs

Initialize() sets this->Array to null, and that
results in many errors about null derefs.

This doesn’t actually fix those warnings mind you.

Change-Id: I85da8ed1664a6e7dcb1a6c7d987fbfbd309558db
Removed harmless-looking dead code

Change-Id: I6f150f184244e2dc2c348759793960b6b47f81f8
Whitespace/spelling

Change-Id: I6371fd07ee079a2f1abbe48da4e9c9ac343ee226
Fix warning about use-after-free

Not sure if the analyzer is right, but setting
the ivar to null after delete is safe and simple.

Change-Id: I0ac894f12312e7722e9f5b23d6e69a86cf47894e
Fix possible null deref warnings

Removed other checks which are making it think
other things could be null.  Looking elsewhere in
these files, many other places assume these things
aren’t null.

Also fix a call to GetMaximum that should have been
GetMTime.

Change-Id: Ie880a0992b64ce4389ab9b40d48aa32692595362
Handle coloring by field data

Some level of support was previously available for coloring by field
data, but this was restricted to drawing triangle strips. This patch
adds another mode to coloring by field data that enables coloring the
entire data set by a particular tuple in the field data. The field
data tuple gets mapped through the color map, and that color is used
to color the entire data set. The default behavior for triangle strips
is retained by setting this tuple index to -1, the default value.

The motivation for this change is to make it possible to color blocks
in a multi-block dataset according to a value in that block's field
data array, e.g., an initial condition, block ID, etc. Vector values
(arrays with more than one component) are fully supported.

Several other improvements were also made:

- Added test for existing capability of coloring by field data.

- Added test for coloring by tuple of field data.

- Modified vtkMapper::GetScalarModeAsString() to return
  string for field data scalar mode.

- Fixed vtkDataSetSurfaceFilter::UnstructuredGridExecute(...) and
  vtkUnstructuredGridGeometryFilter::RequestData(...)
  to pass field data through to output

Change-Id: I0d97e84ec77e7ea01ca1b1350acce73cb6c4c15b
Enable coloring by indexed lookup for vtkStringArrays

This change makes it possible to map vtkStringArrays to colors using
indexed lookup mode. The vtkStringArrays may be associated with
points, cells, or neither (field data). A slew of changes were
required to give this capability:

- Changed signature of vtkScalarsToColors::MapScalars(...) and
  vtkDiscretizableColorTransferFunction::MapScalars(...)  to take a
  vtkAbstractArray instead of a vtkDataArray. This enables mapping
  non-vtkDataArray arrays, such as vtkStringArrays. These changes are
  backwards compatible because vtkAbstractArray is the parent class of
  vtkDataArray.

- Changed vtkLookupTable::MapScalarsThroughTable2(...) to handle
  vtkStringArrays.

- Changed vtkColorTransferFunction::MapScalarsThroughTable2(...) to handle
  vtkStringArrays.

- Added vtkAbstractMapper::GetAbstractScalars(...) that returns a data
  array as a vtkAbstractArray - needed to retrieve vtkStringArray
  scalars.

- Added some error reporting when unhandled array type is encountered
  in vtkScalarsToColors::MapScalarsThroughTable2.

- Enabled use of vtkStringArrays for coloring in the surface mappers.

- Added some tests for mapping vtkStringArrays with
  vtkColorTransferFunction and vtkDiscretizableColorTransferFunction.

- Added some tests for coloring objects by vtkStringArrays in cell data
  and point data.

- Added logic to vtkMapper and vtkPolyDataMapper2D that generates a
  reasonable default lookup table when a vtkStringArray or other
  non-numeric array is selected for coloring by scalars. This requires
  making the vtkRenderingCore module depend on vtkCommonColor. Added
  tests for this feature.

Change-Id: I91e2e451217139a7daabd7f4a63de0b8ff707ad4
Fix some release graphics resource issues

ParaView IceT does a WindowRemap when using tile display. That
means everythgin has to work with a new window/context so it
identifies a bunch of release graphics resource issues. This
patch fixes a bunch of them. Mostly minor changes the one
large change is to make ReleaseGraphicsResources in Renderer
public like it is for every other class. This is the way it
should be and the original protected method was a mistake from
way way back.  Making it public save us from doing the

SetRenderWindow(NULL)
SetRenderWindow(this)

hack that we have been using to free up resources in the
renderer since we could nto call the protected method.

Change-Id: If31406fa9425417d240311aac110c82409637163
Allow absence of i64 suffix when __int64 exists.

The dashboard showed a compile failure on icc because the i64 suffix
did not exist, even though cmake had detected __int64. This patch uses
a suffix of either l or ll if __int64 is really 'long' or 'long long'.

Change-Id: I69b90821d25e4937e22bfc9bf63faaeae9472030
Merge topic 'missing-suffix-i64' into master

ef02d785 Allow absence of i64 suffix when __int64 exists.
Rename data_index to mode_shape in Exodus reader.

Field variable mode_shape[0] represents the time step (t_index)
if HasModeShapes is not set or the ModeShape otherwise.

Change-Id: Id25aab00dfe04ae142a477650cbc3a17c9b11254
Merge topic 'exodus-15127' into master

084b0bb1 Rename data_index to mode_shape in Exodus reader.
Merge topic 'release_gfx_resource_issues' into master

5c1c4b19 Fix some release graphics resource issues
Merge topic 'analyzer-warnings5' into master

efc3a4e9 Fix possible null deref warnings
53c1f9fb Fix warning about use-after-free
c02f83d0 Whitespace/spelling
ea3f62ea Removed harmless-looking dead code
42815afe Added vtkErrorMacro to code paths that give null ptrs
d5feacbb Fix possible null deref of ‘dsa’
666d78c2 Advance null check to before cast
Ifdef out some code for OpenGLES systems

Change-Id: I6058a1b2623886eab93d7014d11d777144be612d
Merge topic 'gles_fix' into master

81666b51 Ifdef out some code for OpenGLES systems
Merge topic 'KW00001499_ColorByFieldData' into master

94498364 Enable coloring by indexed lookup for vtkStringArrays
a07731a2 Handle coloring by field data