diff options
author | markus@chromium.org <markus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-12 19:23:06 +0000 |
---|---|---|
committer | markus@chromium.org <markus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-12 19:23:06 +0000 |
commit | a490589626452621e27fabcf70e335b1dfd50792 (patch) | |
tree | 4fd90e6f5dba66bf5b05899071b67111208ba99e /sandbox | |
parent | bf5ad689ec6a922a8b8815fcf6223f2b3a22f025 (diff) | |
download | chromium_src-a490589626452621e27fabcf70e335b1dfd50792.zip chromium_src-a490589626452621e27fabcf70e335b1dfd50792.tar.gz chromium_src-a490589626452621e27fabcf70e335b1dfd50792.tar.bz2 |
Fix seccomp sandbox for gcc44
Constness of return values and paramaters were causing compiler errors.
BUG=19120
ISSUE=164373
Review URL: http://codereview.chromium.org/164414
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23202 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox')
-rw-r--r-- | sandbox/linux/seccomp/debug.cc | 2 | ||||
-rw-r--r-- | sandbox/linux/seccomp/sandbox.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sandbox/linux/seccomp/debug.cc b/sandbox/linux/seccomp/debug.cc index b4f30a4..467b460 100644 --- a/sandbox/linux/seccomp/debug.cc +++ b/sandbox/linux/seccomp/debug.cc @@ -148,7 +148,7 @@ void Debug::syscall(int sysnum, const char* msg, int call) { } char unnamed[40] = "Unnamed syscall #"; if (!sysname) { - itoa(strrchr(sysname = unnamed, '\000'), sysnum); + itoa(const_cast<char*>(strrchr(sysname = unnamed, '\000')), sysnum); } #if defined(__NR_socketcall) || defined(__NR_ipc) char extra[40]; diff --git a/sandbox/linux/seccomp/sandbox.cc b/sandbox/linux/seccomp/sandbox.cc index 0c3e499..d6497a1 100644 --- a/sandbox/linux/seccomp/sandbox.cc +++ b/sandbox/linux/seccomp/sandbox.cc @@ -396,7 +396,7 @@ void Sandbox::startSandbox() { for (Maps::const_iterator iter = maps.begin(); iter != maps.end(); ++iter){ Library* library = *iter; for (const char **ptr = libs; *ptr; ptr++) { - char *name = strstr(iter.name().c_str(), *ptr); + const char *name = strstr(iter.name().c_str(), *ptr); if (name) { char ch = name[strlen(*ptr)]; if (ch < 'A' || (ch > 'Z' && ch < 'a') || ch > 'z') { |