Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/common/lib/libprop add/fix linted comments



details:   https://anonhg.NetBSD.org/src/rev/610a18c49377
branches:  trunk
changeset: 934618:610a18c49377
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Jun 14 21:31:01 2020 +0000

description:
add/fix linted comments

diffstat:

 common/lib/libprop/prop_array_util.c      |  6 +++---
 common/lib/libprop/prop_dictionary_util.c |  6 +++++-
 2 files changed, 8 insertions(+), 4 deletions(-)

diffs (61 lines):

diff -r 1be6ef6ad560 -r 610a18c49377 common/lib/libprop/prop_array_util.c
--- a/common/lib/libprop/prop_array_util.c      Sun Jun 14 21:28:58 2020 +0000
+++ b/common/lib/libprop/prop_array_util.c      Sun Jun 14 21:31:01 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: prop_array_util.c,v 1.7 2020/06/14 21:28:58 christos Exp $     */
+/*     $NetBSD: prop_array_util.c,v 1.8 2020/06/14 21:31:01 christos Exp $     */
 
 /*-
  * Copyright (c) 2006, 2020 The NetBSD Foundation, Inc.
@@ -136,7 +136,7 @@
                         unsigned int indx,                             \
                         typ val)                                       \
 {                                                                      \
-       /*LINTED: for conversion from long long to 'long'*/             \
+       /*LINTED: for conversion from 'long long' to 'long'*/           \
        return prop_array_set_ ## which ## _number(array, indx, val);   \
 }                                                                      \
                                                                        \
@@ -144,7 +144,7 @@
 prop_array_add_ ## name (prop_array_t array,                           \
                         typ val)                                       \
 {                                                                      \
-       /*LINTED: for conversion from long long to 'long'*/             \
+       /*LINTED: for conversion from 'long long' to 'long'*/           \
        return prop_array_add_ ## which ## _number(array, val);         \
 }
 
diff -r 1be6ef6ad560 -r 610a18c49377 common/lib/libprop/prop_dictionary_util.c
--- a/common/lib/libprop/prop_dictionary_util.c Sun Jun 14 21:28:58 2020 +0000
+++ b/common/lib/libprop/prop_dictionary_util.c Sun Jun 14 21:31:01 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: prop_dictionary_util.c,v 1.6 2020/06/06 21:25:59 thorpej Exp $ */
+/*     $NetBSD: prop_dictionary_util.c,v 1.7 2020/06/14 21:31:01 christos Exp $        */
 
 /*-
  * Copyright (c) 2006, 2020 The NetBSD Foundation, Inc.
@@ -121,6 +121,7 @@
 prop_dictionary_set_unsigned_number(prop_dictionary_t dict, const char *key,
                                    uintmax_t val)
 {
+       /*LINTED: for conversion from 'long long' to 'long'*/           \
        return prop_dictionary_set_and_rel(dict, key,
                                           prop_number_create_unsigned(val));
 }
@@ -131,6 +132,7 @@
                              const char *key,                          \
                              typ val)                                  \
 {                                                                      \
+       /*LINTED: for conversion from long long to 'long'*/             \
        return prop_dictionary_set_ ## which ## _number(dict, key, val);\
 }
 
@@ -152,6 +154,8 @@
 UTEMPLATE(ushort,    unsigned short)
 UTEMPLATE(uint,      unsigned int)
 UTEMPLATE(ulong,     unsigned long)
+/*###155 [lint] warning conversion to 'unsigned long' due to prototype, arg #3 [259]%%%*/
+/*###155 [lint] warning conversion from 'unsigned long long' to 'unsigned long' may lose accuracy, arg #3 [298]%%%*/
 UTEMPLATE(ulonglong, unsigned long long)
 UTEMPLATE(uintptr,   uintptr_t)
 UTEMPLATE(uint8,     uint8_t)



Home | Main Index | Thread Index | Old Index