X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fcaseproto.h;h=a8468ddeed3b5c5b1978e83897eb956d7ccd5bef;hb=4063e370381d696fa221a5987e596b78abb4d7c3;hp=b85a9f32d9260f02d6339b8f0852caca8518722f;hpb=18021ef879fa68dbec546155311d6676653cf7c3;p=pspp diff --git a/src/data/caseproto.h b/src/data/caseproto.h index b85a9f32d9..a8468ddeed 100644 --- a/src/data/caseproto.h +++ b/src/data/caseproto.h @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2009 Free Software Foundation, Inc. + Copyright (C) 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,8 +21,10 @@ #include #include #include -#include -#include + +#include "data/value.h" +#include "libpspp/cast.h" +#include "libpspp/compiler.h" /* Case prototype. @@ -78,8 +80,8 @@ struct pool; /* Creation and destruction. */ struct caseproto *caseproto_create (void) MALLOC_LIKE; -static inline struct caseproto *caseproto_ref (const struct caseproto *); -struct caseproto *caseproto_ref_pool (const struct caseproto *, struct pool *); +static inline struct caseproto *caseproto_ref (const struct caseproto *) WARN_UNUSED_RESULT; +struct caseproto *caseproto_ref_pool (const struct caseproto *, struct pool *) WARN_UNUSED_RESULT; static inline void caseproto_unref (struct caseproto *); /* Inspecting stored widths. */ @@ -144,7 +146,7 @@ void caseproto_free__ (struct caseproto *); static inline struct caseproto * caseproto_ref (const struct caseproto *proto_) { - struct caseproto *proto = (struct caseproto *) proto_; + struct caseproto *proto = CONST_CAST (struct caseproto *, proto_); proto->ref_cnt++; return proto; }