summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-19 02:46:37 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-19 02:49:41 +0300
commitc2c1322b230dc0f564397ac68615640f1083ee56 (patch)
tree9cbdf777c0636e16963f368cb9d9fc48f094ff13 /src/map/script.c
parent5b74faa8afd04771af7acb918072ea71a3db475f (diff)
downloadhercules-c2c1322b230dc0f564397ac68615640f1083ee56.tar.gz
hercules-c2c1322b230dc0f564397ac68615640f1083ee56.tar.bz2
hercules-c2c1322b230dc0f564397ac68615640f1083ee56.tar.xz
hercules-c2c1322b230dc0f564397ac68615640f1083ee56.zip
Fix some cast discards 'const' qualifier from pointer target type warnings.
Add -Wcast-qual into configure comment.
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 4b3bf960c..4ae667b37 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -6651,7 +6651,7 @@ BUILDIN(getarraysize)
return true;
}
int script_array_index_cmp(const void *a, const void *b) {
- return ( *(unsigned int*)a - *(unsigned int*)b );
+ return ( *(const unsigned int*)a - *(const unsigned int*)b );
}
/// Deletes count or all the elements in an array, from the starting index.
@@ -11007,7 +11007,7 @@ BUILDIN(getstatus)
case 4: script_pushint(st, sd->sc.data[id]->val4); break;
case 5:
{
- struct TimerData* td = (struct TimerData*)timer->get(sd->sc.data[id]->timer);
+ const struct TimerData* td = (const struct TimerData*)timer->get(sd->sc.data[id]->timer);
if( td ) {
// return the amount of time remaining
@@ -19696,7 +19696,7 @@ BUILDIN(checkbound)
/* returns 0 when successful, 1 otherwise */
BUILDIN(bg_match_over) {
bool canceled = script_hasdata(st,3) ? true : false;
- struct bg_arena *arena = bg->name2arena((char*)script_getstr(st, 2));
+ struct bg_arena *arena = bg->name2arena((const char*)script_getstr(st, 2));
if( arena ) {
bg->match_over(arena,canceled);