- Description has changed:

Diff:

~~~~

--- old
+++ new
@@ -11,17 +11,17 @@
   (void)strncpy(addTextBuf, (SaStringT)ntfHeader->additionalText,
         ^
 
-[MEDIUM] /home/zhlukxe/opensaf-code/src/ntf/ntfd/NtfNotification.cc:220:24: 
equality comparison with extraneous parentheses 
[clang-diagnostic-parentheses-equality]
+[MEDIUM] /opensaf-code/src/ntf/ntfd/NtfNotification.cc:220:24: equality 
comparison with extraneous parentheses [clang-diagnostic-parentheses-equality]
     if ((pos->clientId == clientId)) {
                        ^
-[MEDIUM] /home/zhlukxe/opensaf-code/src/ntf/common/ntfsv_enc_dec.c:549:9: 
format specifies type 'unsigned short' but the argument has underlying type 
'unsigned int' [clang-diagnostic-format]
+[MEDIUM] /opensaf-code/src/ntf/common/ntfsv_enc_dec.c:549:9: format specifies 
type 'unsigned short' but the argument has underlying type 'unsigned int' 
[clang-diagnostic-format]
           param->notification.alarm.thresholdInformation
           ^
 
-[MEDIUM] /home/zhlukxe/opensaf-code/src/ntf/common/ntfsv_enc_dec.c:883:16: 
comparison of integers of different signs: 'int' and 'SaUint32T' (aka 'unsigned 
int') [clang-diagnostic-sign-compare]
+[MEDIUM] /opensaf-code/src/ntf/common/ntfsv_enc_dec.c:883:16: comparison of 
integers of different signs: 'int' and 'SaUint32T' (aka 'unsigned int') 
[clang-diagnostic-sign-compare]
   for (i = 0; i < param->numberDiscarded; i++) {
                 ^
 
-[MEDIUM] /home/zhlukxe/opensaf-code/src/ntf/common/ntfsv_enc_dec.c:1262:17: 
comparison of integers of different signs: 'int' and 'SaUint32T' (aka 'unsigned 
int') [clang-diagnostic-sign-compare]
+[MEDIUM] /opensaf-code/src/ntf/common/ntfsv_enc_dec.c:1262:17: comparison of 
integers of different signs: 'int' and 'SaUint32T' (aka 'unsigned int') 
[clang-diagnostic-sign-compare]
     for (i = 0; i < param->numberDiscarded; i++) {
                   ^

~~~~




---

**[tickets:#3377]  ntf: coding issues identified by codechecker**

**Status:** assigned
**Milestone:** 5.25.09
**Created:** Fri Jun 20, 2025 05:42 AM UTC by Khuong Ba Le
**Last Updated:** Tue Jun 24, 2025 09:02 AM UTC
**Owner:** Khuong Ba Le


[HIGH] /opensaf-code/src/ntf/common/ntfsv_mem.c:552:8: Null pointer passed to 
1st parameter expecting 'nonnull' [core.NonNullParamChecker]
  (void)strncpy(dest->additionalText, src->additionalText,
        ^
[HIGH] /opensaf-code/src/ntf/ntfd/ntfs_mbcsv.c:1325:33: Dereference of 
undefined pointer value [core.NullDereference]
      notificationLoggedConfirmed(*header->notificationId);
                                   ^
[HIGH] /opensaf-code/src/ntf/ntfd/ntfsmbcsv.c:1325:33: variable 'header' may be 
uninitialized when used here [clang-diagnostic-conditional-uninitialized]
      notificationLoggedConfirmed(header->notificationId);*
                                   ^                                            
           
[HIGH] /opensaf-code/src/ntf/ntfd/NtfLogger.cc:198:9: Null pointer passed to 
2nd parameter expecting 'nonnull' [core.NonNullParamChecker]
  (void)strncpy(addTextBuf, (SaStringT)ntfHeader->additionalText,
        ^

[MEDIUM] /opensaf-code/src/ntf/ntfd/NtfNotification.cc:220:24: equality 
comparison with extraneous parentheses [clang-diagnostic-parentheses-equality]
    if ((pos->clientId == clientId)) {
                       ^
[MEDIUM] /opensaf-code/src/ntf/common/ntfsv_enc_dec.c:549:9: format specifies 
type 'unsigned short' but the argument has underlying type 'unsigned int' 
[clang-diagnostic-format]
          param->notification.alarm.thresholdInformation
          ^

[MEDIUM] /opensaf-code/src/ntf/common/ntfsv_enc_dec.c:883:16: comparison of 
integers of different signs: 'int' and 'SaUint32T' (aka 'unsigned int') 
[clang-diagnostic-sign-compare]
  for (i = 0; i < param->numberDiscarded; i++) {
                ^

[MEDIUM] /opensaf-code/src/ntf/common/ntfsv_enc_dec.c:1262:17: comparison of 
integers of different signs: 'int' and 'SaUint32T' (aka 'unsigned int') 
[clang-diagnostic-sign-compare]
    for (i = 0; i < param->numberDiscarded; i++) {
                  ^



---

Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
_______________________________________________
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to