Commit 4b6fb468 authored by Sean McBride's avatar Sean McBride

Added static to many private globals

Fixes clang -Wmissing-variable-declarations warnings
parent cb77ffae
......@@ -28,7 +28,7 @@
#include "vtkSmartPointer.h"
const int EXTENT = 100;
int WholeExtent[] = {-EXTENT, EXTENT, -EXTENT, EXTENT, -EXTENT, EXTENT};
static int WholeExtent[] = {-EXTENT, EXTENT, -EXTENT, EXTENT, -EXTENT, EXTENT};
const int NUMBER_OF_PIECES = 50;
static vtkImageData* Pieces[NUMBER_OF_PIECES];
......
......@@ -2635,7 +2635,7 @@ static int test_list[] =
int* vtkTestTessellatorSubdivision::TestList = test_list;
double points[] =
static double points[] =
{
0., 0., 0., 0., 0., 0.,
1., 0., .1, 1., 0., 0.,
......
......@@ -971,7 +971,7 @@ const int StartClipShapesHex[256] = {
20964, 21065, 21091, 21138, 21208, 21234, 21304, 21374 // cases 248 - 255
};
unsigned char ClipShapesHex[] = {
static unsigned char ClipShapesHex[] = {
// Case #0: Unique case #1
ST_HEX, COLOR0, P0, P1, P2, P3, P4, P5, P6, P7,
// Case #1: Unique case #2
......@@ -4450,7 +4450,7 @@ const int StartClipShapesVox[256] = {
20964, 21065, 21112, 21138, 21208, 21234, 21304, 21374 // cases 248 - 255
};
unsigned char ClipShapesVox[] = {
static unsigned char ClipShapesVox[] = {
// Case #0: Unique case #1
ST_HEX, COLOR0, P0, P1, P3, P2, P4, P5, P7, P6,
// Case #1: Unique case #2
......@@ -7882,7 +7882,7 @@ const int StartClipShapesWdg[64] = {
3192, 3208, 3273, 3338, 3359, 3424, 3445, 3466 // cases 56 - 63
};
unsigned char ClipShapesWdg[] = {
static unsigned char ClipShapesWdg[] = {
// Case #0: Unique case #1
ST_WDG, COLOR0, P0, P1, P2, P3, P4, P5,
// Case #1: Unique case #2
......@@ -8472,7 +8472,7 @@ const int StartClipShapesPyr[32] = {
797, 827, 886, 914, 934, 993, 1013, 1033 // cases 24 - 31
};
unsigned char ClipShapesPyr[] = {
static unsigned char ClipShapesPyr[] = {
// Case #0: Unique case #1
ST_PYR, COLOR0, P0, P1, P2, P3, P4,
// Case #1: Unique case #2
......@@ -8670,7 +8670,7 @@ const int StartClipShapesTet[16] = {
110, 124, 140, 156, 170, 186, 200, 214 // cases 8 - 15
};
unsigned char ClipShapesTet[] = {
static unsigned char ClipShapesTet[] = {
// Case #0: Unique case #1
ST_TET, COLOR0, P0, P1, P2, P3,
// Case #1: Unique case #2
......@@ -8740,7 +8740,7 @@ const int StartClipShapesQua[16] = {
116, 132, 144, 166, 182, 194, 210, 226 // cases 8 - 15
};
unsigned char ClipShapesQua[] = {
static unsigned char ClipShapesQua[] = {
// Case #0: Unique case #1
ST_QUA, COLOR0, P0, P1, P2, P3,
// Case #1: Unique case #2
......@@ -8822,7 +8822,7 @@ const int StartClipShapesPix[16] = {
116, 132, 154, 166, 182, 194, 210, 226 // cases 8 - 15
};
unsigned char ClipShapesPix[] = {
static unsigned char ClipShapesPix[] = {
// Case #0: Unique case #1
ST_QUA, COLOR0, P0, P1, P3, P2,
// Case #1: Unique case #2
......@@ -8902,7 +8902,7 @@ const int StartClipShapesTri[8] = {
0, 5, 16, 27, 38, 49, 60, 71 // cases 0 - 7
};
unsigned char ClipShapesTri[] = {
static unsigned char ClipShapesTri[] = {
// Case #0: Unique case #1
ST_TRI, COLOR0, P0, P1, P2,
// Case #1: Unique case #2
......@@ -8944,7 +8944,7 @@ const int NumClipShapesLin[4] = {
const int StartClipShapesLin[4] = {
0, 4, 12, 20 };
unsigned char ClipShapesLin[] = {
static unsigned char ClipShapesLin[] = {
// Case #0: Unique case #1
ST_LIN, COLOR0, P0, P1,
// Case #1: Unique case #2
......@@ -8974,7 +8974,7 @@ const int NumClipShapesVtx[2] = {
const int StartClipShapesVtx[2] = {
0, 3 };
unsigned char ClipShapesVtx[] = {
static unsigned char ClipShapesVtx[] = {
// Case #0: Unique case #1
ST_VTX, COLOR0, P0,
// Case #1: Unique case #2
......
......@@ -34,7 +34,7 @@
#include <vtksys/ios/sstream>
// Reference values
vtkIdType cardCellDistanceSelection2D[] =
static vtkIdType cardCellDistanceSelection2D[] =
{
25,
6,
......
......@@ -36,7 +36,7 @@
#include "vtkTestUtilities.h"
char IPWeventLog[] =
static char IPWeventLog[] =
"# StreamVersion 1\n"
"CharEvent 179 195 0 0 98 1 i\n"
"MiddleButtonPressEvent 179 195 0 0 0 0 i\n"
......
......@@ -48,7 +48,7 @@
#define VTK_CREATE(type, name) \
vtkSmartPointer<type> name = vtkSmartPointer<type>::New()
char ButtonWidgetEventLog[] =
static char ButtonWidgetEventLog[] =
"# StreamVersion 1\n"
"RenderEvent 0 0 0 0 0 0 0\n"
"EnterEvent 125 299 0 0 0 0 0\n"
......
......@@ -78,7 +78,7 @@
#include "vtkRenderWindow.h"
#include "vtkProperty.h"
char TestImageActorContourWidgetLog[] =
static char TestImageActorContourWidgetLog[] =
"# StreamVersion 1\n"
"ConfigureEvent 0 499 0 0 0 0 0\n"
"RenderEvent 0 499 0 0 0 0 0\n"
......
......@@ -34,7 +34,7 @@
#include "vtkRenderer.h"
#include "vtkSphereSource.h"
double TestImplicitPlaneWidget2bPlaneOrigins[3][3] =
static double TestImplicitPlaneWidget2bPlaneOrigins[3][3] =
{ { 0, 10, 0 }, { 10, 0 , 0 }, { 0, 0, 0 } };
class vtkTimerCallback : public vtkCommand
......
......@@ -26,7 +26,7 @@
#include "vtkTestUtilities.h"
char TSWeventLog[] =
static char TSWeventLog[] =
"# StreamVersion 1\n"
"CharEvent 133 125 0 0 98 1 i\n"
"KeyReleaseEvent 133 125 0 0 98 1 i\n"
......
......@@ -45,7 +45,7 @@
#include "vtkSelectionNode.h"
#include <cassert>
vtkRenderer *renderer = NULL;
static vtkRenderer *renderer = NULL;
class MyEndPickCommand : public vtkCommand
{
......
......@@ -30,7 +30,7 @@
#include "vtkRegressionTestImage.h"
//------------------------------------------------------------------------------
double para_coord1[24] = {
static double para_coord1[24] = {
0.0, 0.0, 0.0, //0
1.0, 0.0, 0.0, //1
0.0, 1.0, 0.0, //2
......@@ -39,7 +39,7 @@ double para_coord1[24] = {
0.0, 0.0, 1.0, //5
};
double para_coord2[24] = {
static double para_coord2[24] = {
0.0, 1.0, 0.0, //0
0.0, 0.0, 0.0, //1
1.0, 0.0, 0.0, //2
......@@ -48,7 +48,7 @@ double para_coord2[24] = {
0.0, 0.0, 1.0, //5
};
double points[33] = {
static double points[33] = {
0.0, 0.0, 0.0, //0
0.0,-1.0, 0.0, //1
1.0, 0.0, 0.0, //2
......
......@@ -44,9 +44,9 @@
#include "vtkTextActor.h"
#include "vtkTextProperty.h"
vtkUnsignedCharArray *image;
static vtkUnsignedCharArray *image;
GLfloat laplacian[3][3] = {
static GLfloat laplacian[3][3] = {
{ -0.125f, -0.125f, -0.125f },
{ -0.125f, 1.0f, -0.125f },
{ -0.125f, -0.125f, -0.125f }
......
......@@ -59,7 +59,7 @@
#include "vtkRenderPassCollection.h"
#include "vtkSequencePass.h"
vtkProp * prop = NULL;
static vtkProp * prop = NULL;
const char TestValuePassesEventLog[] =
"# StreamVersion 1\n"
......
......@@ -37,7 +37,7 @@ extern "C" { VTKWRAPPINGPYTHONCORE_EXPORT void PyVTKAddFile_mutable(PyObject *,
//--------------------------------------------------------------------
const char *PyVTKMutableObject_Doc =
static const char *PyVTKMutableObject_Doc =
"A mutable wrapper for immutable objects.\n\n"
"This wrapper class is needed when a VTK method returns a value\n"
"in an argument that has been passed by reference. By calling\n"
......
......@@ -31,7 +31,7 @@
//--------------------------------------------------------------------
const char *PyVTKNamespace_Doc =
static const char *PyVTKNamespace_Doc =
"A python module that wraps a C++ namespace.\n";
//--------------------------------------------------------------------
......
......@@ -34,7 +34,7 @@
//--------------------------------------------------------------------
const char *PyVTKTemplate_Doc =
static const char *PyVTKTemplate_Doc =
"A container for instantiations of class and function templates.\n\n"
"This is a dictionary for templates, provide the template args\n"
"in square brackets to get the desired kind of class.\n";
......
......@@ -181,7 +181,7 @@ public:
//--------------------------------------------------------------------
// The singleton for vtkPythonUtil
vtkPythonUtil *vtkPythonMap = NULL;
static vtkPythonUtil *vtkPythonMap = NULL;
// destructs the singleton when python exits
void vtkPythonUtilDelete()
......
......@@ -66,9 +66,9 @@ static void CreateInitFile(const char *libName,
{
fprintf(fout,"int vtkCreateCommand(ClientData cd, Tcl_Interp *interp,\n"
" int argc, char *argv[]);\n");
fprintf(fout,"\nTcl_HashTable vtkInstanceLookup;\n");
fprintf(fout,"Tcl_HashTable vtkPointerLookup;\n");
fprintf(fout,"Tcl_HashTable vtkCommandLookup;\n");
fprintf(fout,"\nstatic Tcl_HashTable vtkInstanceLookup;\n");
fprintf(fout,"static Tcl_HashTable vtkPointerLookup;\n");
fprintf(fout,"static Tcl_HashTable vtkCommandLookup;\n");
}
else
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment