Skip to content

Commit

Permalink
quieting some compiler warnings
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.parrot.org/parrot/trunk@24860 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
petdance committed Jan 14, 2008
1 parent e4dc535 commit 5fc8155
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
10 changes: 7 additions & 3 deletions include/parrot/packfile.h
Expand Up @@ -226,11 +226,15 @@ typedef struct PackFile_Directory {
PackFile_Segment **segments;
} PackFile_Directory;


typedef opcode_t (*fetch_op)(ARGIN(const unsigned char *));
typedef INTVAL (*fetch_iv)(ARGIN(const unsigned char *));
typedef void (*fetch_nv)(ARGOUT(unsigned char *), ARGIN(const unsigned char *));
typedef struct PackFile {
/* the packfile is its own directory */
PackFile_Directory directory;
PackFile_Directory *dirp; /* for freeing */
const opcode_t *src; /* the possible mmap()ed start of the PF */
opcode_t *src; /* the possible mmap()ed start of the PF */
size_t size; /* size in bytes */
INTVAL is_mmap_ped; /* don't free it, munmap it at destroy */

Expand Down Expand Up @@ -364,7 +368,7 @@ opcode_t * PackFile_Constant_unpack(PARROT_INTERP,

PARROT_API
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
PARROT_CAN_RETURN_NULL
opcode_t * PackFile_Constant_unpack_key(PARROT_INTERP,
ARGIN(PackFile_ConstTable *constt),
ARGMOD(PackFile_Constant *self),
Expand Down Expand Up @@ -550,7 +554,7 @@ PARROT_API
PARROT_WARN_UNUSED_RESULT
opcode_t PackFile_unpack(PARROT_INTERP,
ARGMOD(PackFile *self),
ARGIN(const opcode_t * const packed),
ARGIN(opcode_t *packed),
size_t packed_size)
__attribute__nonnull__(1)
__attribute__nonnull__(2)
Expand Down
6 changes: 3 additions & 3 deletions src/packfile.c
Expand Up @@ -739,7 +739,7 @@ PARROT_API
PARROT_WARN_UNUSED_RESULT
opcode_t
PackFile_unpack(PARROT_INTERP, ARGMOD(PackFile *self),
ARGIN(const opcode_t * const packed), size_t packed_size)
ARGIN(opcode_t *packed), size_t packed_size)
{
PackFile_Header * const header = self->header;
opcode_t *cursor;
Expand Down Expand Up @@ -3547,7 +3547,7 @@ Returns cursor if everything is OK, else zero (0).

PARROT_API
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
PARROT_CAN_RETURN_NULL
opcode_t *
PackFile_Constant_unpack_key(PARROT_INTERP, ARGIN(PackFile_ConstTable *constt),
ARGMOD(PackFile_Constant *self), ARGIN(opcode_t *cursor))
Expand Down Expand Up @@ -3603,7 +3603,7 @@ PackFile_Constant_unpack_key(PARROT_INTERP, ARGIN(PackFile_ConstTable *constt),
key_set_register(interp, tail, op, KEY_pmc_FLAG);
break;
default:
return 0;
return NULL;
}
if (slice_bits) {
if (slice_bits & PF_VT_START_SLICE)
Expand Down

0 comments on commit 5fc8155

Please sign in to comment.