Skip to content

Commit

Permalink
Fix more compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nwellnhof committed Dec 31, 2010
1 parent b3e5f5e commit fbbcdad
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion compilers/imcc/optimizer.c
Expand Up @@ -803,7 +803,7 @@ eval_ins(PARROT_INTERP, ARGIN(const char *op), size_t ops, ARGIN(SymReg **r))
ASSERT_ARGS(eval_ins)
opcode_t eval[4], *pc;
int i;
op_info_t *op_info = (op_info_t *)parrot_hash_get(interp, interp->op_hash, (void *)op);
op_info_t *op_info = (op_info_t *)parrot_hash_get(interp, interp->op_hash, op);
if (!op_info || !STREQ(op_info->full_name, op))
IMCC_fatal(interp, 1, "eval_ins: op '%s' not found\n", op);
/* now fill registers */
Expand Down
2 changes: 1 addition & 1 deletion compilers/imcc/parser_util.c
Expand Up @@ -230,7 +230,7 @@ int
is_op(PARROT_INTERP, ARGIN(const char *name))
{
ASSERT_ARGS(is_op)
return parrot_hash_exists(interp, interp->op_hash, (void *)name);
return parrot_hash_exists(interp, interp->op_hash, name);
}

/*
Expand Down
7 changes: 1 addition & 6 deletions config/gen/makefiles/root.in
Expand Up @@ -1068,14 +1068,9 @@ $(INSTALLABLEPDB) : frontend/parrot_debugger/main$(O) $(LIBPARROT) src/parrot_co
#

src/pbc_disassemble$(O) : \
$(PARROT_H_HEADERS) \
$(INC_DIR)/api.h \
$(INC_DIR)/compiler.h \
$(INC_DIR)/config.h \
$(INC_DIR)/core_types.h \
$(INC_DIR)/feature.h \
$(INC_DIR)/has_header.h \
$(INC_DIR)/longopt.h \
$(INC_DIR)/platform_limits.h \
src/pbc_disassemble.c \

$(DIS) : src/pbc_disassemble$(O) $(LIBPARROT)
Expand Down
2 changes: 1 addition & 1 deletion include/parrot/hash.h
Expand Up @@ -152,7 +152,7 @@ PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
INTVAL parrot_hash_exists(PARROT_INTERP,
ARGIN(const Hash *hash),
ARGIN(void *key))
ARGIN(const void *key))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
__attribute__nonnull__(3);
Expand Down
5 changes: 3 additions & 2 deletions src/hash.c
Expand Up @@ -1336,7 +1336,8 @@ parrot_hash_get(PARROT_INTERP, ARGIN(const Hash *hash), ARGIN(const void *key))

/*
=item C<INTVAL parrot_hash_exists(PARROT_INTERP, const Hash *hash, void *key)>
=item C<INTVAL parrot_hash_exists(PARROT_INTERP, const Hash *hash, const void
*key)>
Returns whether the key exists in the hash.
Expand All @@ -1347,7 +1348,7 @@ Returns whether the key exists in the hash.
PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
INTVAL
parrot_hash_exists(PARROT_INTERP, ARGIN(const Hash *hash), ARGIN(void *key))
parrot_hash_exists(PARROT_INTERP, ARGIN(const Hash *hash), ARGIN(const void *key))
{
ASSERT_ARGS(parrot_hash_exists)
const HashBucket * const bucket = parrot_hash_get_bucket(interp, hash, key);
Expand Down
2 changes: 1 addition & 1 deletion src/pbc_disassemble.c
Expand Up @@ -28,7 +28,7 @@ Without non-option arguments it reads the pbc from STDIN.
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include "parrot/api.h"
#include "parrot/parrot.h"
#include "parrot/longopt.h"

#define PFOPT_UTILS 1
Expand Down
3 changes: 2 additions & 1 deletion tools/dev/nci_thunk_gen.pir
Expand Up @@ -404,7 +404,8 @@ DECL
$S0 = 'get_dynext_loader_decl'(sigs)
$S1 = 'get_loader_body'(sigs)
$S2 = 'sprintf'(<<'LOADER', $S0, $S1)
$S2 = 'sprintf'(<<'LOADER', $S0, $S0, $S1)
%s;
%s {
%s
}
Expand Down

0 comments on commit fbbcdad

Please sign in to comment.