From: Justin Pryzby <justinpryzby@users.sf.net>
Date: Fri, 16 Dec 2016 09:23:38 +0100
Subject: [tksao] Avoid compile time warnings and errors

---
 tksao/colorbar/cbgrid.C | 12 ++++++------
 tksao/frame/grid25d.C   | 10 +++++-----
 tksao/frame/grid2d.C    | 14 +++++++-------
 tksao/frame/grid3d.C    | 24 ++++++++++++------------
 tksao/frame/wcsast.C    |  2 +-
 5 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/tksao/colorbar/cbgrid.C b/tksao/colorbar/cbgrid.C
index c01ab38..a0aff1e 100644
--- a/tksao/colorbar/cbgrid.C
+++ b/tksao/colorbar/cbgrid.C
@@ -123,19 +123,19 @@ int CBGrid::doit(RenderMode rm)
   if (!(frameSet = astFrameSet(astFrame(2,"Domain=WIDGET"),"")))
     goto error;
 
-  if (!(bb = astUnitMap(1,"")))
+  if (!(bb = astUnitMap(1,"%s", "")))
     goto error;
 
   if (!opts->orientation) {
-    if (!(aa = astLutMap(cnt_, lut_, 0, double(opts->width)/(cnt_-1), "")))
+    if (!(aa = astLutMap(cnt_, lut_, 0, double(opts->width)/(cnt_-1), "%s", "")))
       goto error;
-    if (!(cmp = astCmpMap(aa, bb, 0, "")))
+    if (!(cmp = astCmpMap(aa, bb, 0, "%s", "")))
       goto error;
   }
   else {
-    if (!(aa = astLutMap(cnt_, lut_, 0, double(opts->height)/(cnt_-1), "")))
+    if (!(aa = astLutMap(cnt_, lut_, 0, double(opts->height)/(cnt_-1), "%s", "")))
       goto error;
-    if (!(cmp = astCmpMap(bb, aa, 0, "")))
+    if (!(cmp = astCmpMap(bb, aa, 0, "%s", "")))
       goto error;
   }
 
@@ -197,7 +197,7 @@ int CBGrid::doit(RenderMode rm)
     pbox[3] = 0;
   }
 
-  plot = astPlot(frameSet, gbox, pbox, option_);
+  plot = astPlot(frameSet, gbox, pbox, "%s", option_);
 
   // and now create astGrid
   astGrid2dPtr = this;
diff --git a/tksao/frame/grid25d.C b/tksao/frame/grid25d.C
index 2433ad7..64425fd 100644
--- a/tksao/frame/grid25d.C
+++ b/tksao/frame/grid25d.C
@@ -142,7 +142,7 @@ void Grid25d::doit(RenderMode rm)
   // and now create astGrid
   astGrid25dPtr = this;
 
-  AstPlot* plot = astPlot(frameSet, gbox, pbox, option_);
+  AstPlot* plot = astPlot(frameSet, gbox, pbox, "%s", option_);
   astGrid(plot);
 
   astEnd; // now, clean up memory
@@ -155,9 +155,9 @@ void Grid25d::matrixMap(void* frameSet, Matrix& mx, const char* str)
 		 mx.matrix(0,1),mx.matrix(1,1)};
   double tt[] = {mx.matrix(2,0),mx.matrix(2,1)};
 
-  AstMatrixMap* mm = astMatrixMap(2, 2, 0, ss, "");
-  AstShiftMap* sm = astShiftMap(2, tt, "");
-  AstCmpMap* cmp = astCmpMap(mm, sm, 1, "");
+  AstMatrixMap* mm = astMatrixMap(2, 2, 0, ss, "%s", "");
+  AstShiftMap* sm = astShiftMap(2, tt, "%s", "");
+  AstCmpMap* cmp = astCmpMap(mm, sm, 1, "%s", "");
 
-  astAddFrame((AstFrameSet*)frameSet, AST__CURRENT, cmp, astFrame(2, str));
+  astAddFrame((AstFrameSet*)frameSet, AST__CURRENT, cmp, astFrame(2, "%s", str));
 }
diff --git a/tksao/frame/grid2d.C b/tksao/frame/grid2d.C
index 1e1c6dc..97ff738 100644
--- a/tksao/frame/grid2d.C
+++ b/tksao/frame/grid2d.C
@@ -38,7 +38,7 @@ void Grid2d::doit(RenderMode rm)
   astBegin; // start memory management
 
   // map from Widget to Image
-  AstFrameSet* frameSet = astFrameSet(astFrame(2,"Domain=WIDGET"),"");
+  AstFrameSet* frameSet = astFrameSet(astFrame(2,"Domain=WIDGET"),"%s","");
   matrixMap(frameSet,fits->widgetToImage,"Domain=IMAGE");
 
   switch (system_) {
@@ -117,7 +117,7 @@ void Grid2d::doit(RenderMode rm)
       int id = astGetI(ast,"Current");
       int nf = astGetI(frameSet,"NFrame");
       astInvert(ast);
-      astAddFrame(frameSet, AST__CURRENT, astUnitMap(2,""), ast);
+      astAddFrame(frameSet, AST__CURRENT, astUnitMap(2,"%s",""), ast);
       astSetI(frameSet,"Current",id+nf);
     }
     break;
@@ -164,7 +164,7 @@ void Grid2d::doit(RenderMode rm)
   // and now create astGrid
   astGrid2dPtr = this;
 
-  AstPlot* plot = astPlot(frameSet, gbox, pbox, option_);
+  AstPlot* plot = astPlot(frameSet, gbox, pbox, "%s", option_);
   astGrid(plot);
 
   astEnd; // now, clean up memory
@@ -177,9 +177,9 @@ void Grid2d::matrixMap(void* frameSet, Matrix& mx, const char* str)
 		 mx.matrix(0,1),mx.matrix(1,1)};
   double tt[] = {mx.matrix(2,0),mx.matrix(2,1)};
 
-  AstMatrixMap* mm = astMatrixMap(2, 2, 0, ss, "");
-  AstShiftMap* sm = astShiftMap(2, tt, "");
-  AstCmpMap* cmp = astCmpMap(mm, sm, 1, "");
+  AstMatrixMap* mm = astMatrixMap(2, 2, 0, ss, "%s", "");
+  AstShiftMap* sm = astShiftMap(2, tt, "%s", "");
+  AstCmpMap* cmp = astCmpMap(mm, sm, 1, "%s", "");
 
-  astAddFrame((AstFrameSet*)frameSet, AST__CURRENT, cmp, astFrame(2, str));
+  astAddFrame((AstFrameSet*)frameSet, AST__CURRENT, cmp, astFrame(2, "%s", str));
 }
diff --git a/tksao/frame/grid3d.C b/tksao/frame/grid3d.C
index 681f68d..05c5026 100644
--- a/tksao/frame/grid3d.C
+++ b/tksao/frame/grid3d.C
@@ -95,19 +95,19 @@ void Grid3d::doit(RenderMode rm)
 	break;
       case 2:
 	{
-	  AstFrame* zbase = astFrame(1,"");
-	  AstFrame* zcurr = astFrame(1,"");
-	  AstMapping* zmap = (AstMapping*)astUnitMap(1,"");
+	  AstFrame* zbase = astFrame(1,"%s","");
+	  AstFrame* zcurr = astFrame(1,"%s","");
+	  AstMapping* zmap = (AstMapping*)astUnitMap(1,"%s","");
 
 	  AstFrame* wcsbase = (AstFrame*)astGetFrame(ast,AST__BASE);
 	  AstFrame* wcscurr = (AstFrame*)astGetFrame(ast,AST__CURRENT);
 	  AstMapping* wcsmap = (AstMapping*)astGetMapping(ast,AST__BASE,AST__CURRENT);
 
-	  AstCmpFrame* cmpwcsbase = astCmpFrame(wcsbase,zbase,"");
-	  AstCmpFrame* cmpwcscurr = astCmpFrame(wcscurr,zcurr,"");
-	  AstCmpMap* cmpwcsmap = astCmpMap(wcsmap,zmap,0,"");
+	  AstCmpFrame* cmpwcsbase = astCmpFrame(wcsbase,zbase,"%s","");
+	  AstCmpFrame* cmpwcscurr = astCmpFrame(wcscurr,zcurr,"%s","");
+	  AstCmpMap* cmpwcsmap = astCmpMap(wcsmap,zmap,0,"%s","");
 
-	  ast = astFrameSet(cmpwcsbase,"");
+	  ast = astFrameSet(cmpwcsbase,"%s","");
 	  astAddFrame(ast, AST__CURRENT, cmpwcsmap, cmpwcscurr);
 	}
 	break;
@@ -135,7 +135,7 @@ void Grid3d::doit(RenderMode rm)
       int id = astGetI(ast,"Current");
       int nf = astGetI(frameSet,"NFrame");
       astInvert(ast);
-      astAddFrame(frameSet, AST__CURRENT, astUnitMap(3,""), ast);
+      astAddFrame(frameSet, AST__CURRENT, astUnitMap(3,"%s",""), ast);
       astSetI(frameSet,"Current",id+nf);
     }
   }
@@ -177,9 +177,9 @@ void Grid3d::matrixMap(void* frameSet, Matrix3d& mx, const char* str)
 		 mx.matrix(0,2),mx.matrix(1,2),mx.matrix(2,2)};
   double tt[] = {mx.matrix(3,0),mx.matrix(3,1),mx.matrix(3,2)};
 
-  AstMatrixMap* mm = astMatrixMap(3,3,0,ss,"");
-  AstShiftMap* sm = astShiftMap(3,tt,"");
-  AstCmpMap* cmp = astCmpMap(mm,sm,1,"");
+  AstMatrixMap* mm = astMatrixMap(3,3,0,ss,"%s","");
+  AstShiftMap* sm = astShiftMap(3,tt,"%s","");
+  AstCmpMap* cmp = astCmpMap(mm,sm,1,"%s","");
 
-  astAddFrame((AstFrameSet*)frameSet, AST__CURRENT, cmp, astFrame(3, str));
+  astAddFrame((AstFrameSet*)frameSet, AST__CURRENT, cmp, astFrame(3, "%s", str));
 }
diff --git a/tksao/frame/wcsast.C b/tksao/frame/wcsast.C
index e6ec1d6..dd1ec2a 100644
--- a/tksao/frame/wcsast.C
+++ b/tksao/frame/wcsast.C
@@ -63,7 +63,7 @@ void wcsFormat(AstFrameSet* ast, int id, const char* format)
   }
   ostringstream str;
   str << "Format(" << id << ")=" << format << ends;
-  astSet(ast, str.str().c_str());
+  astSet(ast, "%s", str.str().c_str());
 }
 
 Vector wcsTran(Context* context, AstFrameSet* ast,
