rpms/torcs/devel torcs-1.3.0-consts.patch, NONE, 1.1 torcs.spec, 1.22, 1.23
Caolan McNamara
caolanm at fedoraproject.org
Sun Mar 1 19:49:28 UTC 2009
Author: caolanm
Update of /cvs/pkgs/rpms/torcs/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv5036
Modified Files:
torcs.spec
Added Files:
torcs-1.3.0-consts.patch
Log Message:
constify ret of strchr(const *char)
torcs-1.3.0-consts.patch:
--- NEW FILE torcs-1.3.0-consts.patch ---
diff -ru torcs-1.3.0.orig/src/modules/graphic/ssggraph/grtexture.cpp torcs-1.3.0/src/modules/graphic/ssggraph/grtexture.cpp
--- torcs-1.3.0.orig/src/modules/graphic/ssggraph/grtexture.cpp 2009-03-01 17:47:41.000000000 +0000
+++ torcs-1.3.0/src/modules/graphic/ssggraph/grtexture.cpp 2009-03-01 17:49:30.000000000 +0000
@@ -48,13 +48,13 @@
if (mipmap == TRUE) {
// Check the shadow.
- s = strrchr(tfname, '/');
- if (s == NULL) {
- s = (char *) tfname;
+ const char *s2 = strrchr(tfname, '/');
+ if (s2 == NULL) {
+ s2 = tfname;
} else {
- s++;
+ s2++;
}
- if (strstr(s, "shadow") != NULL) {
+ if (strstr(s2, "shadow") != NULL) {
mipmap = FALSE;
}
}
diff -ru torcs-1.3.0.orig/src/tools/trackgen/objects.cpp torcs-1.3.0/src/tools/trackgen/objects.cpp
--- torcs-1.3.0.orig/src/tools/trackgen/objects.cpp 2009-03-01 17:47:41.000000000 +0000
+++ torcs-1.3.0/src/tools/trackgen/objects.cpp 2009-03-01 17:58:46.000000000 +0000
@@ -273,7 +273,7 @@
if ((tfname != NULL) && (tfname[0] != 0)) {
if (writeTextureWithoutPath) {
- char *s = strrchr (tfname, '\\');
+ const char *s = strrchr (tfname, '\\');
if (s == NULL) {
s = strrchr (tfname, '/');
Index: torcs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/torcs/devel/torcs.spec,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- torcs.spec 25 Feb 2009 21:23:24 -0000 1.22
+++ torcs.spec 1 Mar 2009 19:48:56 -0000 1.23
@@ -1,7 +1,7 @@
Summary: The Open Racing Car Simulator
Name: torcs
Version: 1.3.0
-Release: 9%{?dist}
+Release: 10%{?dist}
License: GPLv2+
Group: Amusements/Games
URL: http://torcs.org/
@@ -12,6 +12,7 @@
Source4: http://downloads.sf.net/torcs/TORCS-%{version}-src-robots-olethros.tgz
Patch0: torcs-1.2.4-freealutfix.patch
Patch1: torcs-1.3.0-gcc43.patch
+Patch2: torcs-1.3.0-consts.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires: torcs-data, torcs-data-tracks-road, torcs-data-cars-extra
Requires: opengl-games-utils
@@ -46,6 +47,7 @@
%{__mv} %{name}-%{version}/src/drivers/* src/drivers/
%patch0 -p1 -b .freealutfix
%patch1 -p1 -b .gcc43
+%patch2 -p1 -b .consts
%build
@@ -161,6 +163,9 @@
%changelog
+* Sun Mar 01 2009 Caolán McNamara <caolanm at redhat.com> - 1.3.0-10
+- constify ret of strchr(const *char)
+
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.3.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
More information about the fedora-extras-commits
mailing list