mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-22 19:51:54 +00:00
[build] Fix a warning in attribute const check
The warning flag check worked too well: it enabled the warning and autoconf's default main wanted the const attribute. The bug has been floating around for a while, it seems.
This commit is contained in:
parent
331f3320e2
commit
9871b44d68
4 changed files with 7 additions and 6 deletions
|
@ -110,6 +110,6 @@ int QFV_MipLevels (int width, int height) __attribute__((const));
|
||||||
* \note For tex_palette, VK_FORMAT_R8_UINT is returned. If \a format is
|
* \note For tex_palette, VK_FORMAT_R8_UINT is returned. If \a format is
|
||||||
* not a valid QFFormat, then VK_FORMAT_R8_SRGB is returned.
|
* not a valid QFFormat, then VK_FORMAT_R8_SRGB is returned.
|
||||||
*/
|
*/
|
||||||
VkFormat QFV_ImageFormat (QFFormat format, int srgb);
|
VkFormat QFV_ImageFormat (QFFormat format, int srgb) __attribute__((const));
|
||||||
|
|
||||||
#endif//__QF_Vulkan_image_h
|
#endif//__QF_Vulkan_image_h
|
||||||
|
|
|
@ -166,7 +166,8 @@ AC_MSG_CHECKING(whether $1 works)
|
||||||
save_CFLAGS="$CFLAGS"
|
save_CFLAGS="$CFLAGS"
|
||||||
CFLAGS="$CFLAGS $1"
|
CFLAGS="$CFLAGS $1"
|
||||||
qf_opt_ok=no
|
qf_opt_ok=no
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[qf_opt_ok=yes
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[void func(void);]], [[func();]])],
|
||||||
|
[qf_opt_ok=yes
|
||||||
AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
|
AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
|
||||||
])
|
])
|
||||||
CFLAGS="$save_CFLAGS"
|
CFLAGS="$save_CFLAGS"
|
||||||
|
|
|
@ -118,9 +118,9 @@ struct selector_s;
|
||||||
|
|
||||||
int is_id (const struct type_s *type) __attribute__((pure));
|
int is_id (const struct type_s *type) __attribute__((pure));
|
||||||
int is_class (const struct type_s *type) __attribute__((pure));
|
int is_class (const struct type_s *type) __attribute__((pure));
|
||||||
int is_Class (const struct type_s *type) __attribute__((pure));
|
int is_Class (const struct type_s *type) __attribute__((const));
|
||||||
int is_classptr (const struct type_s *type) __attribute__((pure));
|
int is_classptr (const struct type_s *type) __attribute__((pure));
|
||||||
int is_SEL (const struct type_s *type) __attribute__((pure));
|
int is_SEL (const struct type_s *type) __attribute__((const));
|
||||||
int is_object (const struct type_s *type) __attribute__((const));
|
int is_object (const struct type_s *type) __attribute__((const));
|
||||||
int is_method (const struct type_s *type) __attribute__((const));
|
int is_method (const struct type_s *type) __attribute__((const));
|
||||||
int is_method_description (const struct type_s *type) __attribute__((const));
|
int is_method_description (const struct type_s *type) __attribute__((const));
|
||||||
|
|
|
@ -47,8 +47,8 @@ __attribute__((const)) def_t *qfo_encode_type (type_t *type, defspace_t *space)
|
||||||
__attribute__((const)) int obj_types_assignable (const type_t *dst, const type_t *src) {return 0;}
|
__attribute__((const)) int obj_types_assignable (const type_t *dst, const type_t *src) {return 0;}
|
||||||
void print_protocollist (struct dstring_s *dstr, protocollist_t *protocollist) {}
|
void print_protocollist (struct dstring_s *dstr, protocollist_t *protocollist) {}
|
||||||
int is_id (const type_t *type){return type->type;}
|
int is_id (const type_t *type){return type->type;}
|
||||||
int is_SEL (const type_t *type){return type->type;}
|
int is_SEL (const type_t *type){return 0;}
|
||||||
int is_Class (const type_t *type){return type->type;}
|
int is_Class (const type_t *type){return 0;}
|
||||||
int compare_protocols (protocollist_t *protos1, protocollist_t *protos2){return protos1->count - protos2->count;}
|
int compare_protocols (protocollist_t *protos1, protocollist_t *protos2){return protos1->count - protos2->count;}
|
||||||
void dump_dot (const char *stage, void *data,
|
void dump_dot (const char *stage, void *data,
|
||||||
void (*dump_func) (void *data, const char *fname)){}
|
void (*dump_func) (void *data, const char *fname)){}
|
||||||
|
|
Loading…
Reference in a new issue