chapel-lang/chapel — pull request #727 by gbtitus (2014-10-31 18:21:49+00:00)
Title: Get rid of warnings about non-literal printf() format strings on darwin.

On darwin we get warnings from the gen compiler about non-literal
printf() format strings in these three tests, causing them to fail.
Resolve these warnings as follows:

test/extern/hilde/namedExtern.chpl
We declare printf() such that the fmt argument is implicitly typed
by the corresponding actual argument. That actual arg is a literal
string, but of type Chapel string. The compiler emits code to
convert it to a c_string for the call to the extern printf(), but
this ends up making the actual a variable in the emitted code.
Change the printf() declaration(s) so that the fmt argument is
explicitly a c_string. This makes the compiler emit the literal as
a c_string in the first place, and we don't get conversion code or
the resulting variable.

test/io/vass/time-write.chpl
In this case we actually do need to be able to printf() non-literal
strings. As the code stands we send these as the first (format)
argument to printf(). Since we need to prnt non-literal strings,
change the calls (and declarations) so that we use a "%s" format and
pass the c_string to print as the second argument. Arguably this
adds a slight amount of overhead to the printf() call and thus
changes the test. If this is a problem we'll need to discuss the
point of the test, in particular whether it is testing printf()
performance or the performance of the C buffered I/O FILE interface.
If the latter, we could call puts() here instead of printf().

test/studies/pidigits/bbp/nomem32.chpl
This has the same problem as namedExtern, above. The printf("\t")
here is the only printf() call in the program. Everywhere else we
use Chapel write. Convert the printf() to a write().