From d6f55e275e67cc22466c61c5a676149b6ed08df2 Mon Sep 17 00:00:00 2001 From: Stephen Trainor Date: Tue, 15 Sep 2015 14:34:28 -0600 Subject: [PATCH] Fix compiler warnings for printf statements. --- ObjectiveWMM/WMM/GeomagnetismLibrary.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ObjectiveWMM/WMM/GeomagnetismLibrary.c b/ObjectiveWMM/WMM/GeomagnetismLibrary.c index de9d6f3..393a145 100644 --- a/ObjectiveWMM/WMM/GeomagnetismLibrary.c +++ b/ObjectiveWMM/WMM/GeomagnetismLibrary.c @@ -1208,7 +1208,7 @@ CALLS: MAG_DMSstringToDegree(buffer, &CoordGeodetic->lambda); (The program uses sscanf(buffer, "%d/%d/%d", &MagneticDate->Month, &MagneticDate->Day, &MagneticDate->Year); if(!MAG_DateToYear(MagneticDate, Error_Message)) { - printf(Error_Message); + printf("%s", Error_Message); printf("\nPlease re-enter Date in MM/DD/YYYY or MM DD YYYY format, or as a decimal year\n"); fgets(buffer, 40, stdin); i = 0; @@ -1232,7 +1232,7 @@ CALLS: MAG_DMSstringToDegree(buffer, &CoordGeodetic->lambda); (The program uses { if(!MAG_DateToYear(MagneticDate, Error_Message)) { - printf(Error_Message); + printf("%s", Error_Message); strcpy(buffer, ""); printf("\nError encountered, please re-enter Date in MM/DD/YYYY or MM DD YYYY format, or as a decimal year\n"); fgets(buffer, 40, stdin);