[svn:parrot] r45104 - in trunk: include/parrot src

petdance at svn.parrot.org petdance at svn.parrot.org
Mon Mar 22 17:00:27 UTC 2010


Author: petdance
Date: Mon Mar 22 17:00:26 2010
New Revision: 45104
URL: https://trac.parrot.org/parrot/changeset/45104

Log:
adding more PARROT_* attributes to funcs

Modified:
   trunk/include/parrot/misc.h
   trunk/src/misc.c
   trunk/src/utils.c

Modified: trunk/include/parrot/misc.h
==============================================================================
--- trunk/include/parrot/misc.h	Mon Mar 22 11:04:13 2010	(r45103)
+++ trunk/include/parrot/misc.h	Mon Mar 22 17:00:26 2010	(r45104)
@@ -34,6 +34,7 @@
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 
 PARROT_EXPORT
+PARROT_WARN_UNUSED_RESULT
 INTVAL Parrot_byte_index(SHIM_INTERP,
     ARGIN(const STRING *base),
     ARGIN(const STRING *search),
@@ -51,12 +52,15 @@
         __attribute__nonnull__(3);
 
 PARROT_EXPORT
+PARROT_WARN_UNUSED_RESULT
 FLOATVAL Parrot_float_rand(INTVAL how_random);
 
 PARROT_EXPORT
+PARROT_WARN_UNUSED_RESULT
 INTVAL Parrot_int_rand(INTVAL how_random);
 
 PARROT_EXPORT
+PARROT_WARN_UNUSED_RESULT
 INTVAL Parrot_range_rand(INTVAL from, INTVAL to, INTVAL how_random);
 
 PARROT_EXPORT
@@ -78,12 +82,15 @@
 void Parrot_srand(INTVAL seed);
 
 PARROT_EXPORT
+PARROT_WARN_UNUSED_RESULT
 INTVAL Parrot_uint_rand(INTVAL how_random);
 
 PARROT_CONST_FUNCTION
+PARROT_WARN_UNUSED_RESULT
 FLOATVAL floatval_mod(FLOATVAL n2, FLOATVAL n3);
 
 PARROT_CONST_FUNCTION
+PARROT_WARN_UNUSED_RESULT
 INTVAL intval_mod(INTVAL i2, INTVAL i3);
 
 void Parrot_quicksort(PARROT_INTERP,
@@ -145,7 +152,9 @@
         FUNC_MODIFIES(*ary);
 
 PARROT_EXPORT
-int Parrot_secret_snprintf(
+PARROT_IGNORABLE_RESULT
+int /*@alt void@*/
+Parrot_secret_snprintf(
     ARGOUT(char *buffer),
     NULLOK(const size_t len),
     ARGIN(const char *format),
@@ -192,6 +201,7 @@
 
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
 STRING * Parrot_vsprintf_c(PARROT_INTERP,
     ARGIN(const char *pat),
     va_list args)

Modified: trunk/src/misc.c
==============================================================================
--- trunk/src/misc.c	Mon Mar 22 11:04:13 2010	(r45103)
+++ trunk/src/misc.c	Mon Mar 22 17:00:26 2010	(r45104)
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2001-2008, Parrot Foundation.
+Copyright (C) 2001-2010, Parrot Foundation.
 $Id$
 
 =head1 NAME
@@ -82,6 +82,7 @@
 
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
 STRING *
 Parrot_vsprintf_c(PARROT_INTERP, ARGIN(const char *pat), va_list args)
 {
@@ -256,6 +257,7 @@
 
 
 PARROT_EXPORT
+PARROT_IGNORABLE_RESULT
 int
 Parrot_secret_snprintf(ARGOUT(char *buffer), SHIM(const size_t len),
         ARGIN(const char *format), ...)

Modified: trunk/src/utils.c
==============================================================================
--- trunk/src/utils.c	Mon Mar 22 11:04:13 2010	(r45103)
+++ trunk/src/utils.c	Mon Mar 22 17:00:26 2010	(r45104)
@@ -120,6 +120,7 @@
 */
 
 PARROT_CONST_FUNCTION
+PARROT_WARN_UNUSED_RESULT
 INTVAL
 intval_mod(INTVAL i2, INTVAL i3)
 {
@@ -167,6 +168,7 @@
 */
 
 PARROT_CONST_FUNCTION
+PARROT_WARN_UNUSED_RESULT
 FLOATVAL
 floatval_mod(FLOATVAL n2, FLOATVAL n3)
 {
@@ -422,6 +424,7 @@
 */
 
 PARROT_EXPORT
+PARROT_WARN_UNUSED_RESULT
 FLOATVAL
 Parrot_float_rand(INTVAL how_random)
 {
@@ -444,6 +447,7 @@
 */
 
 PARROT_EXPORT
+PARROT_WARN_UNUSED_RESULT
 INTVAL
 Parrot_uint_rand(INTVAL how_random)
 {
@@ -466,6 +470,7 @@
 */
 
 PARROT_EXPORT
+PARROT_WARN_UNUSED_RESULT
 INTVAL
 Parrot_int_rand(INTVAL how_random)
 {
@@ -488,6 +493,7 @@
 */
 
 PARROT_EXPORT
+PARROT_WARN_UNUSED_RESULT
 INTVAL
 Parrot_range_rand(INTVAL from, INTVAL to, INTVAL how_random)
 {
@@ -582,6 +588,7 @@
 */
 
 PARROT_EXPORT
+PARROT_WARN_UNUSED_RESULT
 INTVAL
 Parrot_byte_index(SHIM_INTERP, ARGIN(const STRING *base),
         ARGIN(const STRING *search), UINTVAL start_offset)
@@ -990,12 +997,6 @@
 
 =back
 
-=head1 HISTORY
-
-Initial version by leo 2003.09.09.
-
-=cut
-
 */
 
 


More information about the parrot-commits mailing list