Hello,
This simple patch fix the build issue with gcc-6.
Please, let me know if it needs improvements.

Regards,
Andrea Claudi




La seguente informativa e' inserita in automatico dal sistema al fine esclusivo della realizzazione dei fini istituzionali dell'ente.

INVESTI NELLA RICERCA il 5 per mille all'Universita' Politecnica delle Marche e' un investimento per i giovani, per il loro futuro - C.F. 00382520427 http://www.univpm.it/5_per_mille
diff -Nru starplot-0.95.5/debian/changelog starplot-0.95.5/debian/changelog
--- starplot-0.95.5/debian/changelog	2014-05-23 19:43:35.000000000 +0200
+++ starplot-0.95.5/debian/changelog	2016-07-12 12:13:32.000000000 +0200
@@ -1,3 +1,10 @@
+starplot (0.95.5-8.2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTBFS in convert.cc for gcc-6. (Closes: #811655)
+
+ -- Andrea Claudi <a.cla...@univpm.it>  Tue, 12 Jul 2016 12:12:51 +0200
+
 starplot (0.95.5-8.1) unstable; urgency=low
 
   * Non-maintainer upload.
diff -Nru starplot-0.95.5/debian/patches/03-fix-ftbfs-convert.diff starplot-0.95.5/debian/patches/03-fix-ftbfs-convert.diff
--- starplot-0.95.5/debian/patches/03-fix-ftbfs-convert.diff	1970-01-01 01:00:00.000000000 +0100
+++ starplot-0.95.5/debian/patches/03-fix-ftbfs-convert.diff	2016-07-12 11:14:26.000000000 +0200
@@ -0,0 +1,40 @@
+Index: starplot-0.95.5/src/convert/convert.cc
+===================================================================
+--- starplot-0.95.5.orig/src/convert/convert.cc
++++ starplot-0.95.5/src/convert/convert.cc
+@@ -49,7 +49,7 @@ void parse_star_file(istream & infile, o
+ 		     bool using_stdout, bool add_sun)
+ {
+   int lineno = 0;
+-  bool sun_found = false, moredata = true;
++  bool sun_found = false;
+   char record[1000];
+   Star * tempstar = 0, * currentstar = 0, * previousstar = 0;
+ 
+@@ -64,7 +64,7 @@ available on the StarPlot web page, you
+ in that package for more information.") << endl << endl;
+ 
+   do {
+-    moredata = infile.getline(record, 999, '\n');
++    infile.getline(record, 999, '\n');
+     record[999] = 0;
+ 
+     // $ ; and , have special meanings to StarPlot, so purge them:
+@@ -73,7 +73,7 @@ in that package for more information.")
+         record[i] = ' ';
+   
+     tempstar = parse_star_record(record, format);
+-    if (tempstar || !moredata) {
++    if (tempstar || infile.eof()) {
+       delete previousstar;
+       previousstar = currentstar;
+       currentstar = tempstar;
+@@ -111,7 +111,7 @@ in that package for more information.")
+     if (!using_stdout && !(lineno % 1000))
+       cout << starstrings::ssprintf(_("%d records converted."), lineno) << endl;
+ 
+-  } while (moredata) ;
++  } while (!infile.eof()) ;
+ 
+   delete previousstar;
+ 
diff -Nru starplot-0.95.5/debian/patches/series starplot-0.95.5/debian/patches/series
--- starplot-0.95.5/debian/patches/series	2012-06-26 21:12:55.000000000 +0200
+++ starplot-0.95.5/debian/patches/series	2016-07-12 12:12:29.000000000 +0200
@@ -1,2 +1,3 @@
 01-starplot_desktop_file.diff
 02-fix-ftbfs-and-hrdiagram-opts.diff
+03-fix-ftbfs-convert.diff

Reply via email to