]> git.pld-linux.org Git - packages/d.git/commitdiff
- string::npos can be larger than unsigned
authorJakub Bogusz <qboosh@pld-linux.org>
Mon, 1 Dec 2003 07:29:38 +0000 (07:29 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    d-types.patch -> 1.1

d-types.patch [new file with mode: 0644]

diff --git a/d-types.patch b/d-types.patch
new file mode 100644 (file)
index 0000000..3ca57a1
--- /dev/null
@@ -0,0 +1,63 @@
+--- d-1.2.0/src/parse_opt_cfg.cpp.orig 2003-08-25 05:40:19.000000000 +0000
++++ d-1.2.0/src/parse_opt_cfg.cpp      2003-12-01 07:20:26.000000000 +0000
+@@ -246,7 +246,7 @@
+               }
+               string s;
+-              unsigned idx;
++              string::size_type idx;
+               while (1) {
+                       idx = arg.find(",", 0);
+                       if (idx == arg.npos) {
+@@ -440,9 +440,9 @@
+               opt = "";
+               arg = "";
+-              unsigned idx = src.find('=', 0);
++              string::size_type idx = src.find('=', 0);
+               if (idx == src.npos) {
+-                      unsigned idx2 = src.find(' ', idx);
++                      string::size_type idx2 = src.find(' ', idx);
+                       if (idx2 != src.npos) {
+                               err << "  Spaces in the expression!";
+                               throw runtime_error(err.str());
+@@ -463,7 +463,7 @@
+                       throw runtime_error(err.str());
+               }
+-              unsigned idx2 = src.find('=', idx + 1);
++              string::size_type idx2 = src.find('=', idx + 1);
+               if (idx2 != src.npos) {
+                       err << "  More than one equals sign on the line!";
+                       throw runtime_error(err.str());
+@@ -515,7 +515,7 @@
+                               arg.erase(0, 1);
+                       }
+-                      unsigned idx = arg.find(' ', 0);
++                      string::size_type idx = arg.find(' ', 0);
+                       if (idx != src.npos) {
+                               err << "  Spaces in the expression!";
+                               throw runtime_error(err.str());
+@@ -637,7 +637,7 @@
+                       src = ptr;
+-                      unsigned idx = src.find('#', 0);
++                      string::size_type idx = src.find('#', 0);
+                       if (idx != src.npos)
+                               src.erase(idx);
+--- d-1.2.0/src/path.cpp.orig  2003-08-30 13:42:32.000000000 +0000
++++ d-1.2.0/src/path.cpp       2003-12-01 07:18:20.000000000 +0000
+@@ -82,8 +82,8 @@
+ //-----------------------------------------------------------------------------
+ void path::normalize_auxillary(const char* source_string)
+ {
+-      unsigned idx1;
+-      unsigned idx2;
++      string::size_type idx1;
++      string::size_type idx2;
+       fdir = "";
+       fname = "";
This page took 1.212868 seconds and 4 git commands to generate.