[Swift-commit] r8186 - SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/md-src

wozniak at ci.uchicago.edu wozniak at ci.uchicago.edu
Thu Aug 14 11:53:39 CDT 2014


Author: wozniak
Date: 2014-08-14 11:53:39 -0500 (Thu, 14 Aug 2014)
New Revision: 8186

Modified:
   SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/md-src/main.c
   SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/md-src/md.c
   SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/md-src/md.h
Log:
Satisfy -Wall; fix unlinked symbol


Modified: SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/md-src/main.c
===================================================================
--- SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/md-src/main.c	2014-08-14 16:53:03 UTC (rev 8185)
+++ SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/md-src/main.c	2014-08-14 16:53:39 UTC (rev 8186)
@@ -71,21 +71,15 @@
   double ctime1;
   double ctime2;
   double dt = 0.0001;
-  int i;
-  int id;
   double mass = 1.0 * .0001;
   int nd;
   int np;
 
   int seed = 123456789;
-  int step;
   int step_num;
-  int step_print;
-  int step_print_index = 0;
   int step_print_num = 10;
   double scale_factor = 2.5;
   double scale_offset = 2.0;
-  double *vel;
 
   timestamp ( );
   printf ( "\n" );

Modified: SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/md-src/md.c
===================================================================
--- SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/md-src/md.c	2014-08-14 16:53:03 UTC (rev 8185)
+++ SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/md-src/md.c	2014-08-14 16:53:39 UTC (rev 8186)
@@ -34,7 +34,7 @@
 		char* outfile,
 		char* trjfile)
 {
-   int step_print, step_print_index;
+   int step_print, step_print_index = 0;
    scale_factor_g = scale_factor;
    scale_offset_g = scale_offset;
 
@@ -489,13 +489,12 @@
 
   static char time_buffer[TIME_SIZE];
   const struct tm *tm;
-  size_t len;
   time_t now;
 
   now = time ( NULL );
   tm = localtime ( &now );
 
-  len = strftime ( time_buffer, TIME_SIZE, "%d %B %Y %I:%M:%S %p", tm );
+  strftime ( time_buffer, TIME_SIZE, "%d %B %Y %I:%M:%S %p", tm );
 
   printf ( "%s\n", time_buffer );
 
@@ -573,7 +572,7 @@
 s	-0.5 -0.3 -1	0.05	1.0 0.2 0.05		50.0	0.1
 s	0.5 -0.4 0		0.05	0.1 0.85 1.0		50.0	0.1
 	*/
-    char *s = "0.05 1.0 0.2 0.05 50.0 0.1";
+    // char *s = "0.05 1.0 0.2 0.05 50.0 0.1";
     /* printf("s %f %f %f %s\n", pos[0+j*nd]/20.0, pos[1+j*nd]/20.0, pos[2+j*nd]/20.0, s); */
   }
 

Modified: SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/md-src/md.h
===================================================================
--- SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/md-src/md.h	2014-08-14 16:53:03 UTC (rev 8185)
+++ SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/md-src/md.h	2014-08-14 16:53:39 UTC (rev 8186)
@@ -8,7 +8,6 @@
 #ifndef MD_H
 #define MD_H
 
-extern double scale_factor, scale_offset;
 extern char *printinfo;
 
 double cpu_time ( void );
@@ -21,17 +20,6 @@
 void compute ( int np, int nd, double pos[], double vel[],
   double mass, double f[], double *pot, double *kin );
 
-/*
-void simulate (int step_num, int step_print_num,
-               int step_print, int step_print_index,
-               int np, int nd,
-               double mass,
-               double dt,
-               int seed,
-               char* outfile,
-               char* trjfile);
-*/
-
 void simulate ( int nd, int np,
 		int step_num, int step_print_num,
 		double dt,




More information about the Swift-commit mailing list