Fixed defects

List of Defects

Error: COMPILER_WARNING (CWE-704): [#def1]
libXaw-1.0.15-build/libXaw-1.0.15/src/Actions.c: scope_hint: In function 'XawParseBoolean'
libXaw-1.0.15-build/libXaw-1.0.15/src/Actions.c:160:11: warning[-Wbad-function-cast]: cast from function call of type 'double' to non-matching type 'int'
#  160 |   value = (int)strtod(param, &tmp);
#      |           ^
#  158|       return (False);
#  159|   
#  160|->   value = (int)strtod(param, &tmp);
#  161|     if (*tmp == '\0')
#  162|       return (value);

Error: CLANG_WARNING: [#def2]
libXaw-1.0.15-build/libXaw-1.0.15/src/Actions.c:475:4: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
#  473|   	{
#  474|   	case 1:
#  475|-> 	  XtSetArg(arglist[num_args], XrmQuarkToString(resource->qname), c_1);
#  476|   	  break;
#  477|   	case 2:

Error: CLANG_WARNING: [#def3]
libXaw-1.0.15-build/libXaw-1.0.15/src/Actions.c:478:4: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
#  476|   	  break;
#  477|   	case 2:
#  478|-> 	  XtSetArg(arglist[num_args], XrmQuarkToString(resource->qname), c_2);
#  479|   	  break;
#  480|   	case 4:

Error: CLANG_WARNING: [#def4]
libXaw-1.0.15-build/libXaw-1.0.15/src/Actions.c:481:4: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
#  479|   	  break;
#  480|   	case 4:
#  481|-> 	  XtSetArg(arglist[num_args], XrmQuarkToString(resource->qname), c_4);
#  482|   	  break;
#  483|   #ifdef LONG64

Error: CLANG_WARNING: [#def5]
libXaw-1.0.15-build/libXaw-1.0.15/src/Actions.c:485:4: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
#  483|   #ifdef LONG64
#  484|   	case 8:
#  485|-> 	  XtSetArg(arglist[num_args], XrmQuarkToString(resource->qname), c_8);
#  486|   	  break;
#  487|   #endif

Error: GCC_ANALYZER_WARNING (CWE-688): [#def6]
libXaw-1.0.15-build/libXaw-1.0.15/src/Actions.c: scope_hint: In function 'XawDeclareActionVar.part.0'
libXaw-1.0.15-build/libXaw-1.0.15/src/Actions.c:921:11: warning[-Wanalyzer-null-argument]: use of NULL 'value' where non-null expected
libXaw-1.0.15-build/libXaw-1.0.15/src/Actions.c:34: included_from: Included from here.
/usr/include/string.h:156:12: note: argument 2 of 'strcmp' must be non-null
#  919|         String val = escape ? escape : value;
#  920|   
#  921|->       if (strcmp(XrmQuarkToString(variable->qvalue), val) == 0)
#  922|   	{
#  923|   	  if (escape)

Error: CLANG_WARNING: [#def7]
libXaw-1.0.15-build/libXaw-1.0.15/src/Actions.c:921:11: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
#  919|         String val = escape ? escape : value;
#  920|   
#  921|->       if (strcmp(XrmQuarkToString(variable->qvalue), val) == 0)
#  922|   	{
#  923|   	  if (escape)

Error: CLANG_WARNING: [#def8]
libXaw-1.0.15-build/libXaw-1.0.15/src/AsciiSink.c:458:11: warning[deadcode.DeadStores]: Although the value stored to 'tmp' is used in the enclosing expression, the value is never actually read from 'tmp'
#  456|   	   to calculate the ascent/descent, do it here to avoid an extra
#  457|   	   search in the entities */
#  458|->     pos = tmp = left = ctx->text.lt.info[line].position;
#  459|       right = ctx->text.lt.info[line + 1].position;
#  460|       right = XawMin(right, ctx->text.lastPos + 1);

Error: CLANG_WARNING: [#def9]
libXaw-1.0.15-build/libXaw-1.0.15/src/AsciiSink.c:575:2: warning[deadcode.DeadStores]: Value stored to 'pos2' is never read
#  573|   	segment.x1 = x;
#  574|   
#  575|-> 	pos2 = tmp;
#  576|   	while (length > 0) {
#  577|   	    pos2 = XawTextSourceRead(ctx->text.source, tmp, &block, (int)length);

Error: CLANG_WARNING: [#def10]
libXaw-1.0.15-build/libXaw-1.0.15/src/AsciiSink.c:1390:18: warning[deadcode.DeadStores]: Value stored to 'font' during its initialization is never read
# 1388|       AsciiSinkObject sink = (AsciiSinkObject)w;
# 1389|       TextWidget ctx = (TextWidget)XtParent(w);
# 1390|->     XFontStruct *font = sink->ascii_sink.font;
# 1391|       Widget source = ctx->text.source;
# 1392|       XawTextPosition idx, pos;

Error: CLANG_WARNING: [#def11]
libXaw-1.0.15-build/libXaw-1.0.15/src/AsciiSink.c:1404:5: warning[deadcode.DeadStores]: Value stored to 'c' is never read
# 1402|       pos = idx = fromPos;
# 1403|       rWidth = 0;
# 1404|->     c = 0;
# 1405|   
# 1406|       while (!done) {

Error: CLANG_WARNING: [#def12]
libXaw-1.0.15-build/libXaw-1.0.15/src/AsciiSink.c:1501:18: warning[deadcode.DeadStores]: Value stored to 'font' during its initialization is never read
# 1499|       TextWidget ctx = (TextWidget)XtParent(w);
# 1500|       Widget source = ctx->text.source;
# 1501|->     XFontStruct *font = sink->ascii_sink.font;
# 1502|       XawTextPosition idx, pos, whiteSpacePosition = 0;
# 1503|       int i, lastWidth, whiteSpaceWidth, rWidth, ascent = 0, descent = 0;

Error: CLANG_WARNING: [#def13]
libXaw-1.0.15-build/libXaw-1.0.15/src/AsciiSrc.c:527:19: warning[core.NullDereference]: Access to field 'next' results in a dereference of a null pointer (loaded from variable 'temp_piece')
#  525|   
#  526|   	while (temp_piece != end_piece) {
#  527|-> 	    temp_piece = temp_piece->next;
#  528|   	    RemovePiece(src, temp_piece->prev);
#  529|   	}

Error: CLANG_WARNING: [#def14]
libXaw-1.0.15-build/libXaw-1.0.15/src/AsciiSrc.c:531:18: warning[core.NullDereference]: Access to field 'used' results in a dereference of a null pointer (loaded from variable 'end_piece')
#  529|   	}
#  530|   
#  531|-> 	end_piece->used -= endPos - end_first;
#  532|   	if (end_piece->used != 0)
#  533|   	    memmove(end_piece->text, end_piece->text + endPos - end_first,

Error: CLANG_WARNING: [#def15]
libXaw-1.0.15-build/libXaw-1.0.15/src/Box.c:372:29: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
#  370|   
#  371|       w->box.last_query_mode = constraint->request_mode;
#  372|->     w->box.last_query_width = constraint->width;
#  373|       w->box.last_query_height= constraint->height;
#  374|   

Error: CLANG_WARNING: [#def16]
libXaw-1.0.15-build/libXaw-1.0.15/src/DisplayList.c:743:38: warning[core.UndefinedBinaryOperatorResult]: The left operand of '+' is a garbage value
#  741|         else
#  742|   	{
#  743|-> 	  points[0].x = (short)(points[0].x + xpad);
#  744|   	  points[0].y = (short)(points[0].y + ypad);
#  745|   	}

Error: COMPILER_WARNING (CWE-704): [#def17]
libXaw-1.0.15-build/libXaw-1.0.15/src/DisplayList.c: scope_hint: In function '_Xaw_Xlib_ArgsInitProc'
libXaw-1.0.15-build/libXaw-1.0.15/src/DisplayList.c:1754:18: warning[-Wbad-function-cast]: cast from function call of type 'long int' to non-matching type 'void *'
# 1754 |         retval = (void *)read_int((char *)params[0], NULL);
#      |                  ^
# 1752|       case LWIDTH:
# 1753|         if (*num_params == 1)
# 1754|-> 	retval = (void *)read_int((char *)params[0], NULL);
# 1755|         break;
# 1756|       case ARCMODE:

Error: COMPILER_WARNING (CWE-704): [#def18]
libXaw-1.0.15-build/libXaw-1.0.15/src/DisplayList.c:1899:18: warning[-Wbad-function-cast]: cast from function call of type 'long int' to non-matching type 'void *'
# 1899 |         retval = (void *)read_int((char *)params[0], NULL);
#      |                  ^
# 1897|       case PLANEMASK:
# 1898|         if (*num_params == 1)
# 1899|-> 	retval = (void *)read_int((char *)params[0], NULL);
# 1900|         break;
# 1901|       case DSTRING:

Error: COMPILER_WARNING (CWE-704): [#def19]
libXaw-1.0.15-build/libXaw-1.0.15/src/DisplayList.c:1917:18: warning[-Wbad-function-cast]: cast from function call of type 'Font' {aka 'long unsigned int'} to non-matching type 'void *'
# 1917 |         retval = (void *)XLoadFont(DisplayOfScreen(screen), params[0]);
#      |                  ^
# 1915|       case FONT:
# 1916|         if (*num_params == 1)
# 1917|-> 	retval = (void *)XLoadFont(DisplayOfScreen(screen), params[0]);
# 1918|         break;
# 1919|       case DASHES:

Error: COMPILER_WARNING (CWE-704): [#def20]
libXaw-1.0.15-build/libXaw-1.0.15/src/DisplayList.c:1945:22: warning[-Wbad-function-cast]: cast from function call of type 'long int' to non-matching type 'void *'
# 1945 |             retval = (void *)read_int((char *)params[0], NULL);
#      |                      ^
# 1943|   	{
# 1944|   	  if (isdigit((unsigned char)params[0][0]) || params[0][0] == '+' || params[0][0] == '-')
# 1945|-> 	    retval = (void *)read_int((char *)params[0], NULL);
# 1946|   	  else if (XmuCompareISOLatin1(params[0], "true") == 0 ||
# 1947|   	    XmuCompareISOLatin1(params[0], "on") == 0)

Error: CLANG_WARNING: [#def21]
libXaw-1.0.15-build/libXaw-1.0.15/src/DisplayList.c:2128:8: warning[deadcode.DeadStores]: Although the value stored to 'info' is used in the enclosing expression, the value is never actually read from 'info'
# 2126|       return (False);
# 2127|   
# 2128|->   if ((info = _XawFindDLInfo(lc, name)) != NULL)
# 2129|       /* Since the data structures to the displayList classes are(should be)
# 2130|        * opaque, it is not a good idea to allow overriding a displayList

Error: CLANG_WARNING: [#def22]
libXaw-1.0.15-build/libXaw-1.0.15/src/Label.c:361:7: warning[deadcode.DeadStores]: Value stored to 'width' during its initialization is never read
#  359|   	    }
#  360|   	    if (*label) {
#  361|-> 		int width = XTextWidth(fs, label, (int)strlen(label));
#  362|   
#  363|   		if (lw->label.encoding)

Error: CLANG_WARNING: [#def23]
libXaw-1.0.15-build/libXaw-1.0.15/src/MenuButton.c:225:4: warning[core.NullDereference]: Dereference of null pointer
#  223|   	snprintf(error_buf, sizeof(error_buf),
#  224|   		 "MenuButton:  Could not find menu widget named %s.",
#  225|-> 		 mbw->menu_button.menu_name);
#  226|   	XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
#  227|   	return;

Error: CLANG_WARNING: [#def24]
libXaw-1.0.15-build/libXaw-1.0.15/src/MultiSrc.c:420:19: warning[core.NullDereference]: Access to field 'next' results in a dereference of a null pointer (loaded from variable 'temp_piece')
#  418|   
#  419|   	while (temp_piece != end_piece) {
#  420|-> 	    temp_piece = temp_piece->next;
#  421|   	    RemovePiece(src, temp_piece->prev);
#  422|   	}

Error: CLANG_WARNING: [#def25]
libXaw-1.0.15-build/libXaw-1.0.15/src/MultiSrc.c:423:18: warning[core.NullDereference]: Access to field 'used' results in a dereference of a null pointer (loaded from variable 'end_piece')
#  421|   	    RemovePiece(src, temp_piece->prev);
#  422|   	}
#  423|-> 	end_piece->used -= endPos - end_first;
#  424|   	if (end_piece->used != 0)
#  425|   	    memmove(end_piece->text, end_piece->text + endPos - end_first,

Error: CLANG_WARNING: [#def26]
libXaw-1.0.15-build/libXaw-1.0.15/src/MultiSrc.c:590:4: warning[deadcode.DeadStores]: Value stored to 'c' is never read
#  588|   			    return (0);
#  589|   			ptr = piece->text + piece->used - 1;
#  590|-> 			c = *ptr;
#  591|   		    }
#  592|   		    else if (ptr >= piece->text + piece->used) {

Error: CLANG_WARNING: [#def27]
libXaw-1.0.15-build/libXaw-1.0.15/src/Paned.c:1125:27: warning[core.NullDereference]: Dereference of null pointer
# 1123|   	int old_add_size = add_size, old_sub_size;
# 1124|   
# 1125|-> 	AssignMax(add_size, (int)PaneInfo(pw->paned.whichadd)->min);
# 1126|   	AssignMin(add_size, (int)PaneInfo(pw->paned.whichadd)->max);
# 1127|   	if (add_size != old_add_size)

Error: CLANG_WARNING: [#def28]
libXaw-1.0.15-build/libXaw-1.0.15/src/Paned.c:1131:27: warning[core.NullDereference]: Dereference of null pointer
# 1129|   
# 1130|   	old_sub_size = sub_size;
# 1131|-> 	AssignMax(sub_size, (int)PaneInfo(pw->paned.whichsub)->min);
# 1132|   	AssignMin(sub_size, (int)PaneInfo(pw->paned.whichsub)->max);
# 1133|   	if (sub_size != old_sub_size)

Error: COMPILER_WARNING (CWE-704): [#def29]
libXaw-1.0.15-build/libXaw-1.0.15/src/Pixmap.c: scope_hint: In function 'BitmapLoader'
libXaw-1.0.15-build/libXaw-1.0.15/src/Pixmap.c:750:27: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  748|         if (!sub[0].substitution)
#  749|   	sub[0].substitution = getenv("HOME");
#  750|->       sub[1].substitution = params->name;
#  751|         if (pixmap_path == NULL)
#  752|   	GetResourcePixmapPath(DisplayOfScreen(screen));

Error: COMPILER_WARNING (CWE-704): [#def30]
libXaw-1.0.15-build/libXaw-1.0.15/src/Pixmap.c:758:14: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  756|       }
#  757|     else
#  758|->     filename = params->name;
#  759|   
#  760|     if (XReadBitmapFileData(filename, &width, &height, &data,

Error: COMPILER_WARNING (CWE-704): [#def31]
libXaw-1.0.15-build/libXaw-1.0.15/src/Pixmap.c: scope_hint: In function 'GradientLoader'
libXaw-1.0.15-build/libXaw-1.0.15/src/Pixmap.c:831:11: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  829|     value = NULL;
#  830|     if ((argval = XawFindArgVal(params, "start")) != NULL)
#  831|->     value = argval->value;
#  832|     if (value && !XAllocNamedColor(DisplayOfScreen(screen), colormap, value,
#  833|   			    &start, &color))

Error: COMPILER_WARNING (CWE-704): [#def32]
libXaw-1.0.15-build/libXaw-1.0.15/src/Pixmap.c:842:11: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  840|     value = NULL;
#  841|     if ((argval = XawFindArgVal(params, "end")) != NULL)
#  842|->     value = argval->value;
#  843|     if (value && !XAllocNamedColor(DisplayOfScreen(screen), colormap, value,
#  844|   			    &end, &color))

Error: COMPILER_WARNING (CWE-704): [#def33]
libXaw-1.0.15-build/libXaw-1.0.15/src/Pixmap.c: scope_hint: In function 'XPixmapLoader'
libXaw-1.0.15-build/libXaw-1.0.15/src/Pixmap.c:952:27: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  950|         if (!sub[0].substitution)
#  951|   	sub[0].substitution = getenv("HOME");
#  952|->       sub[1].substitution = params->name;
#  953|         if (pixmap_path == NULL)
#  954|   	GetResourcePixmapPath(DisplayOfScreen(screen));

Error: CLANG_WARNING: [#def34]
libXaw-1.0.15-build/libXaw-1.0.15/src/SimpleMenu.c:1073:12: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'child')
# 1071|   	next_child = child;
# 1072|       }
# 1073|->     *child = (Widget)smw->simple_menu.label;
# 1074|   }
# 1075|   

Error: CLANG_WARNING: [#def35]
libXaw-1.0.15-build/libXaw-1.0.15/src/SimpleMenu.c:1108:5: warning[deadcode.DeadStores]: Value stored to 'height' is never read
# 1106|       Dimension *widths;
# 1107|   
# 1108|->     height = 0;
# 1109|   
# 1110|       if (XtIsSubclass(w, simpleMenuWidgetClass)) {

Error: CLANG_WARNING: [#def36]
libXaw-1.0.15-build/libXaw-1.0.15/src/SimpleMenu.c:1556:2: warning[deadcode.DeadStores]: Value stored to 'warp' is never read
# 1554|       if (x_root == WidthOfScreen(XtScreen(w)) - 1 &&
# 1555|   	XtX(w) + XtWidth(w) + (XtBorderWidth(w)) > x_root) {
# 1556|-> 	warp = -8;
# 1557|   	if (smw->simple_menu.entry_set) {
# 1558|   	    entry = DoGetEventEntry(w,

Error: CPPCHECK_WARNING (CWE-457): [#def37]
libXaw-1.0.15-build/libXaw-1.0.15/src/StripChart.c:337: error[uninitvar]: Uninitialized variable: value
#  335|   	return;
#  336|   
#  337|->     XtCallCallbacks((Widget)w, XtNgetValue, (XtPointer)&value);
#  338|   
#  339|       /*

Error: COMPILER_WARNING (CWE-704): [#def38]
libXaw-1.0.15-build/libXaw-1.0.15/src/Text.c: scope_hint: In function '_XawTextSetScrollBars'
libXaw-1.0.15-build/libXaw-1.0.15/src/Text.c:1507:17: warning[-Wbad-function-cast]: cast from function call of type 'unsigned int' to non-matching type 'float'
# 1507 |         denom = (float)GetWidestLine(ctx);
#      |                 ^
# 1505|   
# 1506|       if (ctx->text.scroll_horiz == XawtextScrollAlways) {
# 1507|-> 	denom = (float)GetWidestLine(ctx);
# 1508|   	if (denom <= 0)
# 1509|   	    denom = (float)((int)XtWidth(ctx) - RHMargins(ctx));

Error: CLANG_WARNING: [#def39]
libXaw-1.0.15-build/libXaw-1.0.15/src/Text.c:1715:2: warning[deadcode.DeadStores]: Value stored to 'y1' is never read
# 1713|   	update_from = lt->info[lt->lines - vlines].position;
# 1714|   	update_to = lt->info[lt->lines].position;
# 1715|-> 	y1 = lt->info[lt->lines - vlines].y;
# 1716|   	y2 = lt->info[vlines].y;
# 1717|   	DoCopyArea(ctx, ctx->text.r_margin.left, y2,

Error: COMPILER_WARNING (CWE-704): [#def40]
libXaw-1.0.15-build/libXaw-1.0.15/src/Text.c: scope_hint: In function 'HJump'
libXaw-1.0.15-build/libXaw-1.0.15/src/Text.c:1768:57: warning[-Wbad-function-cast]: cast from function call of type 'unsigned int' to non-matching type 'float'
# 1768 |              (ctx->text.r_margin.left - (int)(percent * (float)GetWidestLine(ctx)));
#      |                                                         ^
# 1766|   
# 1767|       pixels = ctx->text.left_margin -
# 1768|-> 	     (ctx->text.r_margin.left - (int)(percent * (float)GetWidestLine(ctx)));
# 1769|   
# 1770|       HScroll(w, (XtPointer)ctx, (XtPointer)pixels);

Error: CLANG_WARNING: [#def41]
libXaw-1.0.15-build/libXaw-1.0.15/src/Text.c:3065:10: warning[deadcode.DeadStores]: Value stored to 'clear_to_eol' during its initialization is never read
# 3063|   	int insert_line = LineForPosition(ctx, ctx->text.insertPos);
# 3064|   	int scroll_by = insert_line - (ctx->text.lt.lines >> 1);
# 3065|-> 	Boolean clear_to_eol = ctx->text.clear_to_eol;
# 3066|   
# 3067|   	XawTextScroll(ctx, scroll_by, 0);

Error: COMPILER_WARNING (CWE-704): [#def42]
libXaw-1.0.15-build/libXaw-1.0.15/src/TextAction.c: scope_hint: In function '_SelectionReceived'
libXaw-1.0.15-build/libXaw-1.0.15/src/TextAction.c:424:28: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
#  422|   		    "an illegal selection.\n");
#  423|   
#  424|-> 	    textprop.value = (const unsigned char *)" >> ILLEGAL SELECTION << ";
#  425|   	    textprop.nitems = strlen((char *) textprop.value);
#  426|   	    if (XwcTextPropertyToTextList(d, &textprop, &wlist, &count)

Error: CLANG_WARNING: [#def43]
libXaw-1.0.15-build/libXaw-1.0.15/src/TextAction.c:1199:15: warning[core.NullDereference]: Access to field 'next' results in a dereference of a null pointer (loaded from variable 'tail')
# 1197|   		    if (kill_ring->refcount == 0) {
# 1198|   			--num_kill_rings;
# 1199|-> 			tail->next = NULL;
# 1200|   			XtFree(kill_ring->contents);
# 1201|   			XtFree((char*)kill_ring);

Error: CLANG_WARNING: [#def44]
libXaw-1.0.15-build/libXaw-1.0.15/src/TextAction.c:1294:3: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
# 1292|   	    salt->contents = XtMalloc((length + size + 1));
# 1293|   	    if (from >= old_from) {
# 1294|-> 		strncpy(salt->contents, ring, (size_t)size);
# 1295|   		salt->contents[size] = '\0';
# 1296|   		strncat(salt->contents, string, (size_t)length);

Error: CLANG_WARNING: [#def45]
libXaw-1.0.15-build/libXaw-1.0.15/src/TextAction.c:1301:3: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
# 1299|   		strncpy(salt->contents, string, (size_t)length);
# 1300|   		salt->contents[length] = '\0';
# 1301|-> 		strncat(salt->contents, ring, (size_t)size);
# 1302|   	    }
# 1303|   	    salt->contents[length + size] = '\0';

Error: CLANG_WARNING: [#def46]
libXaw-1.0.15-build/libXaw-1.0.15/src/TextAction.c:1606:5: warning[deadcode.DeadStores]: Value stored to 'position' is never read
# 1604|       text.length = 1;
# 1605|   
# 1606|->     position = XawTextSourceRead(ctx->text.source, position,
# 1607|   				 &block, (int)(right - left));
# 1608|       done = False;

Error: CLANG_WARNING: [#def47]
libXaw-1.0.15-build/libXaw-1.0.15/src/TextAction.c:1643:5: warning[deadcode.DeadStores]: Value stored to 'position' is never read
# 1641|       text.length = 0;
# 1642|       position = tmp = left;
# 1643|->     position = XawTextSourceRead(ctx->text.source, position,
# 1644|   				 &block, (int)(right - left));
# 1645|       ipos = ctx->text.insertPos;

Error: CLANG_WARNING: [#def48]
libXaw-1.0.15-build/libXaw-1.0.15/src/TextAction.c:1724:5: warning[deadcode.DeadStores]: Value stored to 'position' is never read
# 1722|       text.length = 1;
# 1723|   
# 1724|->     position = XawTextSourceRead(ctx->text.source, position,
# 1725|   				 &block, (int)(right - left));
# 1726|       ipos = ctx->text.insertPos;

Error: CLANG_WARNING: [#def49]
libXaw-1.0.15-build/libXaw-1.0.15/src/TextAction.c:1868:5: warning[deadcode.DeadStores]: Value stored to 'position' is never read
# 1866|       text.ptr = tabs;
# 1867|   
# 1868|->     position = XawTextSourceRead(ctx->text.source, position,
# 1869|   				 &block, (int)(right - left));
# 1870|       ipos = ctx->text.insertPos;

Error: CLANG_WARNING: [#def50]
libXaw-1.0.15-build/libXaw-1.0.15/src/TextAction.c:2238:3: warning[deadcode.DeadStores]: Value stored to 'right' is never read
# 2236|   		XawStackFree(text.ptr, buf);
# 2237|   		position += count;
# 2238|-> 		right += count;
# 2239|   		if (num_pos) {
# 2240|   		    for (cpos = 0; cpos < num_pos; cpos++)

Error: CLANG_WARNING: [#def51]
libXaw-1.0.15-build/libXaw-1.0.15/src/TextAction.c:2300:7: warning[deadcode.DeadStores]: Value stored to 'right' is never read
# 2298|   		    }
# 2299|   		    position += count;
# 2300|-> 		    right += count;
# 2301|   		    XawStackFree(text.ptr, buf);
# 2302|   		}

Error: COMPILER_WARNING (CWE-704): [#def52]
libXaw-1.0.15-build/libXaw-1.0.15/src/TextAction.c: scope_hint: In function 'InsertString'
libXaw-1.0.15-build/libXaw-1.0.15/src/TextAction.c:3298:51: warning[-Wdiscarded-qualifiers]: passing argument 1 of 'IfHexConvertHexElseReturnParam' discards 'const' qualifier from pointer target type
libXaw-1.0.15-build/libXaw-1.0.15/src/TextAction.c:3218:38: note: expected 'char *' but argument is of type 'String' {aka 'const char *'}
# 3296|       StartAction(ctx, event);
# 3297|       for (i = (int)*num_params; i; i--, params++) {	/* DO FOR EACH PARAMETER */
# 3298|-> 	text.ptr = IfHexConvertHexElseReturnParam(*params, &text.length);
# 3299|   
# 3300|   	if (text.length == 0)

Error: COMPILER_WARNING (CWE-704): [#def53]
libXaw-1.0.15-build/libXaw-1.0.15/src/TextAction.c: scope_hint: In function 'DisplayCaret'
libXaw-1.0.15-build/libXaw-1.0.15/src/TextAction.c:3373:48: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
# 3371|       if (*num_params > 0) {	/* default arg is "True" */
# 3372|   	XrmValue from, to;
# 3373|-> 	from.size = (unsigned)strlen(from.addr = params[0]);
# 3374|   	XtConvert(w, XtRString, &from, XtRBoolean, &to);
# 3375|   

Error: CLANG_WARNING: [#def54]
libXaw-1.0.15-build/libXaw-1.0.15/src/TextAction.c:3419:6: warning[deadcode.DeadStores]: Value stored to 'mult' is never read
# 3417|   	}
# 3418|   	else if (mult == 32767) {
# 3419|-> 	    mult = ctx->text.mult = (short)(- (params[0][0] - '0'));
# 3420|   	    return;
# 3421|   	}

Error: CLANG_WARNING: [#def55]
libXaw-1.0.15-build/libXaw-1.0.15/src/TextAction.c:3543:38: warning[deadcode.DeadStores]: Although the value stored to 'endPos' is used in the enclosing expression, the value is never actually read from 'endPos'
# 3541|   
# 3542|       /* Strip out CR's. */
# 3543|->     eop_begin = eop_end = startPos = endPos = from;
# 3544|   
# 3545|       /* CONSTCOND */

Error: CLANG_WARNING: [#def56]
libXaw-1.0.15-build/libXaw-1.0.15/src/TextAction.c:3745:2: warning[deadcode.DeadStores]: Value stored to 'to' is never read
# 3743|   	if (!StripSpaces(ctx, from + inc, to, pos, num_pos, NULL))
# 3744|   	    return (XawReplaceError);
# 3745|-> 	to += ctx->text.lastPos - len;
# 3746|   
# 3747|   	FormatText(ctx, from, ctx->text.justify != XawjustifyFull, pos, num_pos);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def57]
libXaw-1.0.15-build/libXaw-1.0.15/src/TextPop.c: scope_hint: In function 'InsertFileNamed'
libXaw-1.0.15-build/libXaw-1.0.15/src/TextPop.c:321:70: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(str, "r")'
#  319|   
#  320|       fseek(file, 0L, SEEK_SET);
#  321|->     if (fread(text.ptr, 1, (size_t)text.length, file) != (size_t)text.length)
#  322|   	XtErrorMsg("readError", "insertFileNamed", "XawError",
#  323|   		   "fread returned error", NULL, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
libXaw-1.0.15-build/libXaw-1.0.15/src/TextPop.c:321:70: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(str, "r")'
#  319|   
#  320|       fseek(file, 0L, SEEK_SET);
#  321|->     if (fread(text.ptr, 1, (size_t)text.length, file) != (size_t)text.length)
#  322|   	XtErrorMsg("readError", "insertFileNamed", "XawError",
#  323|   		   "fread returned error", NULL, NULL);

Error: CLANG_WARNING: [#def59]
libXaw-1.0.15-build/libXaw-1.0.15/src/Tip.c:529:22: warning[deadcode.DeadStores]: Although the value stored to 'tip' is used in the enclosing expression, the value is never actually read from 'tip'
#  527|   
#  528|       if (tip == NULL)
#  529|-> 	return (first_tip = tip = CreateTipInfo(w));
#  530|   
#  531|       for (ptip = tip; tip; ptip = tip, tip = tip->next)

Error: CLANG_WARNING: [#def60]
libXaw-1.0.15-build/libXaw-1.0.15/src/Tree.c:909:11: warning[core.NullDereference]: Dereference of null pointer
#  907|   	Position adjusted;
#  908|   	firstcc = TREE_CONSTRAINT (tc->tree.children[0]);
#  909|-> 	lastcc = TREE_CONSTRAINT (child);
#  910|   
#  911|   	/* Adjustments are disallowed if they result in a position above

Error: CLANG_WARNING: [#def61]
libXaw-1.0.15-build/libXaw-1.0.15/src/Vendor.c:333:10: warning[deadcode.DeadStores]: Although the value stored to 'ext' is used in the enclosing expression, the value is never actually read from 'ext'
#  331|       VendorShellWidgetClass vsclass = (VendorShellWidgetClass)cclass;
#  332|   
#  333|->     if ((ext = (CompositeClassExtension)
#  334|   	    XtGetClassExtension (cclass,
#  335|   				 XtOffsetOf(CompositeClassRec,

Error: CLANG_WARNING: [#def62]
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:499:7: warning[deadcode.DeadStores]: Although the value stored to 'p' is used in the enclosing expression, the value is never actually read from 'p'
#  497|       }
#  498|       if (xim == NULL) {
#  499|-> 	if ((p = XSetLocaleModifiers("")) != NULL) {
#  500|   	    xim = XOpenIM(XtDisplay(ve->parent), NULL, NULL, NULL);
#  501|   	}

Error: CLANG_WARNING: [#def63]
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:516:9: warning[deadcode.DeadStores]: Value stored to 'ns' is never read
#  514|       }
#  515|       found = False;
#  516|->     for(ns = s = ve->im.preedit_type; s && !found;) {
#  517|   	while (*s && isspace((unsigned char)*s)) s++;
#  518|   	if (!*s) break;

Error: CLANG_WARNING: [#def64]
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:734:2: warning[core.CallAndMessage]: 5th function call argument is an uninitialized value
#  732|   
#  733|       if (ic_cnt > 0) {
#  734|-> 	XGetICValues(p->xic, ic_a[0], ic_a[1], ic_a[2], ic_a[3], NULL);
#  735|   	if (pe_attr) XFree(pe_attr);
#  736|   	if (st_attr) XFree(st_attr);

Error: CLANG_WARNING: [#def65]
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:888:12: warning[core.CallAndMessage]: 11th function call argument is an uninitialized value
#  886|       if (pe_cnt > 0) {
#  887|   	pe_a[pe_cnt] = (XPointer) NULL;
#  888|-> 	pe_attr = XVaCreateNestedList(0, pe_a[0], pe_a[1], pe_a[2], pe_a[3],
#  889|   				   pe_a[4], pe_a[5], pe_a[6], pe_a[7], pe_a[8],
#  890|   				   pe_a[9], pe_a[10], pe_a[11], pe_a[12],

Error: CLANG_WARNING: [#def66]
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:888:12: warning[core.CallAndMessage]: 13th function call argument is an uninitialized value
#  886|       if (pe_cnt > 0) {
#  887|   	pe_a[pe_cnt] = (XPointer) NULL;
#  888|-> 	pe_attr = XVaCreateNestedList(0, pe_a[0], pe_a[1], pe_a[2], pe_a[3],
#  889|   				   pe_a[4], pe_a[5], pe_a[6], pe_a[7], pe_a[8],
#  890|   				   pe_a[9], pe_a[10], pe_a[11], pe_a[12],

Error: CLANG_WARNING: [#def67]
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:888:12: warning[core.CallAndMessage]: 15th function call argument is an uninitialized value
#  886|       if (pe_cnt > 0) {
#  887|   	pe_a[pe_cnt] = (XPointer) NULL;
#  888|-> 	pe_attr = XVaCreateNestedList(0, pe_a[0], pe_a[1], pe_a[2], pe_a[3],
#  889|   				   pe_a[4], pe_a[5], pe_a[6], pe_a[7], pe_a[8],
#  890|   				   pe_a[9], pe_a[10], pe_a[11], pe_a[12],

Error: CLANG_WARNING: [#def68]
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:888:12: warning[core.CallAndMessage]: 17th function call argument is an uninitialized value
#  886|       if (pe_cnt > 0) {
#  887|   	pe_a[pe_cnt] = (XPointer) NULL;
#  888|-> 	pe_attr = XVaCreateNestedList(0, pe_a[0], pe_a[1], pe_a[2], pe_a[3],
#  889|   				   pe_a[4], pe_a[5], pe_a[6], pe_a[7], pe_a[8],
#  890|   				   pe_a[9], pe_a[10], pe_a[11], pe_a[12],

Error: CLANG_WARNING: [#def69]
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:888:12: warning[core.CallAndMessage]: 5th function call argument is an uninitialized value
#  886|       if (pe_cnt > 0) {
#  887|   	pe_a[pe_cnt] = (XPointer) NULL;
#  888|-> 	pe_attr = XVaCreateNestedList(0, pe_a[0], pe_a[1], pe_a[2], pe_a[3],
#  889|   				   pe_a[4], pe_a[5], pe_a[6], pe_a[7], pe_a[8],
#  890|   				   pe_a[9], pe_a[10], pe_a[11], pe_a[12],

Error: CLANG_WARNING: [#def70]
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:888:12: warning[core.CallAndMessage]: 7th function call argument is an uninitialized value
#  886|       if (pe_cnt > 0) {
#  887|   	pe_a[pe_cnt] = (XPointer) NULL;
#  888|-> 	pe_attr = XVaCreateNestedList(0, pe_a[0], pe_a[1], pe_a[2], pe_a[3],
#  889|   				   pe_a[4], pe_a[5], pe_a[6], pe_a[7], pe_a[8],
#  890|   				   pe_a[9], pe_a[10], pe_a[11], pe_a[12],

Error: CLANG_WARNING: [#def71]
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:888:12: warning[core.CallAndMessage]: 9th function call argument is an uninitialized value
#  886|       if (pe_cnt > 0) {
#  887|   	pe_a[pe_cnt] = (XPointer) NULL;
#  888|-> 	pe_attr = XVaCreateNestedList(0, pe_a[0], pe_a[1], pe_a[2], pe_a[3],
#  889|   				   pe_a[4], pe_a[5], pe_a[6], pe_a[7], pe_a[8],
#  890|   				   pe_a[9], pe_a[10], pe_a[11], pe_a[12],

Error: COMPILER_WARNING (CWE-457): [#def72]
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c: scope_hint: In function 'CreateIC'
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:888:19: warning[-Wmaybe-uninitialized]: 'pe_a' may be used uninitialized
#  888 |         pe_attr = XVaCreateNestedList(0, pe_a[0], pe_a[1], pe_a[2], pe_a[3],
#      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  889 |                                    pe_a[4], pe_a[5], pe_a[6], pe_a[7], pe_a[8],
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  890 |                                    pe_a[9], pe_a[10], pe_a[11], pe_a[12],
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  891 |                                    pe_a[13], pe_a[14], pe_a[15], pe_a[16],
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  892 |                                    pe_a[17], pe_a[18],  NULL);
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:791:35: note: 'pe_a' declared here
#  791 |     XPointer            ic_a[20], pe_a[20], st_a[20];
#      |                                   ^~~~
#  886|       if (pe_cnt > 0) {
#  887|   	pe_a[pe_cnt] = (XPointer) NULL;
#  888|-> 	pe_attr = XVaCreateNestedList(0, pe_a[0], pe_a[1], pe_a[2], pe_a[3],
#  889|   				   pe_a[4], pe_a[5], pe_a[6], pe_a[7], pe_a[8],
#  890|   				   pe_a[9], pe_a[10], pe_a[11], pe_a[12],

Error: CLANG_WARNING: [#def73]
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:899:12: warning[core.CallAndMessage]: 5th function call argument is an uninitialized value
#  897|       if (st_cnt > 0) {
#  898|   	st_a[st_cnt] = (XPointer) NULL;
#  899|-> 	st_attr = XVaCreateNestedList(0, st_a[0], st_a[1], st_a[2], st_a[3],
#  900|   				   st_a[4], st_a[5], st_a[6], st_a[7], st_a[8],
#  901|   				   st_a[9], st_a[10], st_a[11], st_a[12],

Error: COMPILER_WARNING (CWE-457): [#def74]
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:899:19: warning[-Wmaybe-uninitialized]: 'st_a' may be used uninitialized
#  899 |         st_attr = XVaCreateNestedList(0, st_a[0], st_a[1], st_a[2], st_a[3],
#      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  900 |                                    st_a[4], st_a[5], st_a[6], st_a[7], st_a[8],
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  901 |                                    st_a[9], st_a[10], st_a[11], st_a[12],
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  902 |                                    st_a[13], st_a[14], st_a[15], st_a[16],
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  903 |                                    st_a[17], st_a[18],  NULL);
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:791:45: note: 'st_a' declared here
#  791 |     XPointer            ic_a[20], pe_a[20], st_a[20];
#      |                                             ^~~~
#  897|       if (st_cnt > 0) {
#  898|   	st_a[st_cnt] = (XPointer) NULL;
#  899|-> 	st_attr = XVaCreateNestedList(0, st_a[0], st_a[1], st_a[2], st_a[3],
#  900|   				   st_a[4], st_a[5], st_a[6], st_a[7], st_a[8],
#  901|   				   st_a[9], st_a[10], st_a[11], st_a[12],

Error: GCC_ANALYZER_WARNING (CWE-457): [#def75]
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c: scope_hint: In function 'CreateIC'
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:909:14: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'ic_a[18]'
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:57: included_from: Included from here.
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c: scope_hint: In function 'CreateIC'
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c: scope_hint: In function 'CreateIC'
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c: scope_hint: In function 'CreateIC'
#  907|       ic_a[ic_cnt] = (XPointer) NULL;
#  908|   
#  909|->     p->xic = XCreateIC(ve->im.xim, ic_a[0], ic_a[1], ic_a[2], ic_a[3],
#  910|   		       ic_a[4], ic_a[5], ic_a[6], ic_a[7], ic_a[8], ic_a[9],
#  911|   		       ic_a[10], ic_a[11], ic_a[12], ic_a[13], ic_a[14],

Error: COMPILER_WARNING (CWE-457): [#def76]
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:909:14: warning[-Wmaybe-uninitialized]: 'ic_a' may be used uninitialized
#  909 |     p->xic = XCreateIC(ve->im.xim, ic_a[0], ic_a[1], ic_a[2], ic_a[3],
#      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  910 |                        ic_a[4], ic_a[5], ic_a[6], ic_a[7], ic_a[8], ic_a[9],
#      |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  911 |                        ic_a[10], ic_a[11], ic_a[12], ic_a[13], ic_a[14],
#      |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  912 |                        ic_a[15], ic_a[16], ic_a[17], ic_a[18], NULL);
#      |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:791:25: note: 'ic_a' declared here
#  791 |     XPointer            ic_a[20], pe_a[20], st_a[20];
#      |                         ^~~~
#  907|       ic_a[ic_cnt] = (XPointer) NULL;
#  908|   
#  909|->     p->xic = XCreateIC(ve->im.xim, ic_a[0], ic_a[1], ic_a[2], ic_a[3],
#  910|   		       ic_a[4], ic_a[5], ic_a[6], ic_a[7], ic_a[8], ic_a[9],
#  911|   		       ic_a[10], ic_a[11], ic_a[12], ic_a[13], ic_a[14],

Error: CLANG_WARNING: [#def77]
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:909:14: warning[core.CallAndMessage]: 9th function call argument is an uninitialized value
#  907|       ic_a[ic_cnt] = (XPointer) NULL;
#  908|   
#  909|->     p->xic = XCreateIC(ve->im.xim, ic_a[0], ic_a[1], ic_a[2], ic_a[3],
#  910|   		       ic_a[4], ic_a[5], ic_a[6], ic_a[7], ic_a[8], ic_a[9],
#  911|   		       ic_a[10], ic_a[11], ic_a[12], ic_a[13], ic_a[14],

Error: CLANG_WARNING: [#def78]
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:974:6: warning[deadcode.DeadStores]: Value stored to 'height' is never read
#  972|   		    + maxDescentOfFontSet(p->font_set);
#  973|   	    }
#  974|-> 	    height = (int)SetVendorShellHeight(ve, (unsigned)height);
#  975|   	}
#  976|   	if (p->flg & CIFg) {

Error: CLANG_WARNING: [#def79]
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:1026:12: warning[core.CallAndMessage]: 11th function call argument is an uninitialized value
# 1024|       if (pe_cnt > 0) {
# 1025|   	pe_a[pe_cnt] = (XPointer) NULL;
# 1026|-> 	pe_attr = XVaCreateNestedList(0, pe_a[0], pe_a[1], pe_a[2], pe_a[3],
# 1027|   				      pe_a[4], pe_a[5], pe_a[6], pe_a[7],
# 1028|   				      pe_a[8], pe_a[9], pe_a[10], pe_a[11],

Error: CLANG_WARNING: [#def80]
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:1026:12: warning[core.CallAndMessage]: 5th function call argument is an uninitialized value
# 1024|       if (pe_cnt > 0) {
# 1025|   	pe_a[pe_cnt] = (XPointer) NULL;
# 1026|-> 	pe_attr = XVaCreateNestedList(0, pe_a[0], pe_a[1], pe_a[2], pe_a[3],
# 1027|   				      pe_a[4], pe_a[5], pe_a[6], pe_a[7],
# 1028|   				      pe_a[8], pe_a[9], pe_a[10], pe_a[11],

Error: CLANG_WARNING: [#def81]
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:1026:12: warning[core.CallAndMessage]: 7th function call argument is an uninitialized value
# 1024|       if (pe_cnt > 0) {
# 1025|   	pe_a[pe_cnt] = (XPointer) NULL;
# 1026|-> 	pe_attr = XVaCreateNestedList(0, pe_a[0], pe_a[1], pe_a[2], pe_a[3],
# 1027|   				      pe_a[4], pe_a[5], pe_a[6], pe_a[7],
# 1028|   				      pe_a[8], pe_a[9], pe_a[10], pe_a[11],

Error: CLANG_WARNING: [#def82]
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:1026:12: warning[core.CallAndMessage]: 9th function call argument is an uninitialized value
# 1024|       if (pe_cnt > 0) {
# 1025|   	pe_a[pe_cnt] = (XPointer) NULL;
# 1026|-> 	pe_attr = XVaCreateNestedList(0, pe_a[0], pe_a[1], pe_a[2], pe_a[3],
# 1027|   				      pe_a[4], pe_a[5], pe_a[6], pe_a[7],
# 1028|   				      pe_a[8], pe_a[9], pe_a[10], pe_a[11],

Error: COMPILER_WARNING (CWE-457): [#def83]
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c: scope_hint: In function 'SetICValues'
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:1026:19: warning[-Wmaybe-uninitialized]: 'pe_a' may be used uninitialized
# 1026 |         pe_attr = XVaCreateNestedList(0, pe_a[0], pe_a[1], pe_a[2], pe_a[3],
#      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1027 |                                       pe_a[4], pe_a[5], pe_a[6], pe_a[7],
#      |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1028 |                                       pe_a[8], pe_a[9], pe_a[10], pe_a[11],
#      |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1029 |                                       pe_a[12], pe_a[13], pe_a[14], pe_a[15],
#      |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1030 |                                       pe_a[16], pe_a[17], pe_a[18],  NULL);
#      |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:940:35: note: 'pe_a' declared here
#  940 |     XPointer            ic_a[20], pe_a[20], st_a[20];
#      |                                   ^~~~
# 1024|       if (pe_cnt > 0) {
# 1025|   	pe_a[pe_cnt] = (XPointer) NULL;
# 1026|-> 	pe_attr = XVaCreateNestedList(0, pe_a[0], pe_a[1], pe_a[2], pe_a[3],
# 1027|   				      pe_a[4], pe_a[5], pe_a[6], pe_a[7],
# 1028|   				      pe_a[8], pe_a[9], pe_a[10], pe_a[11],

Error: COMPILER_WARNING (CWE-457): [#def84]
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:1036:19: warning[-Wmaybe-uninitialized]: 'st_a' may be used uninitialized
# 1036 |         st_attr = XVaCreateNestedList(0, st_a[0], st_a[1], st_a[2], st_a[3],
#      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1037 |                                       st_a[4], st_a[5], st_a[6], st_a[7],
#      |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1038 |                                       st_a[8], st_a[9], st_a[10], st_a[11],
#      |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1039 |                                       st_a[12], st_a[13], st_a[14], st_a[15],
#      |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1040 |                                       st_a[16], st_a[17], st_a[18],  NULL);
#      |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:940:45: note: 'st_a' declared here
#  940 |     XPointer            ic_a[20], pe_a[20], st_a[20];
#      |                                             ^~~~
# 1034|       if (st_cnt > 0) {
# 1035|   	st_a[st_cnt] = (XPointer) NULL;
# 1036|-> 	st_attr = XVaCreateNestedList(0, st_a[0], st_a[1], st_a[2], st_a[3],
# 1037|   				      st_a[4], st_a[5], st_a[6], st_a[7],
# 1038|   				      st_a[8], st_a[9], st_a[10], st_a[11],

Error: CLANG_WARNING: [#def85]
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:1050:2: warning[core.CallAndMessage]: 5th function call argument is an uninitialized value
# 1048|       if (ic_cnt > 0) {
# 1049|   	ic_a[ic_cnt] = (XPointer) NULL;
# 1050|-> 	XSetICValues(p->xic, ic_a[0], ic_a[1], ic_a[2], ic_a[3], ic_a[4],
# 1051|   		     ic_a[5], ic_a[6], ic_a[7], ic_a[8], ic_a[9], ic_a[10],
# 1052|   		     ic_a[11], ic_a[12], ic_a[13], ic_a[14], ic_a[15],

Error: GCC_ANALYZER_WARNING (CWE-457): [#def86]
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c: scope_hint: In function 'SetICValues'
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:1050:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'ic_a[18]'
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c: scope_hint: In function 'SetICValues'
# 1048|       if (ic_cnt > 0) {
# 1049|   	ic_a[ic_cnt] = (XPointer) NULL;
# 1050|-> 	XSetICValues(p->xic, ic_a[0], ic_a[1], ic_a[2], ic_a[3], ic_a[4],
# 1051|   		     ic_a[5], ic_a[6], ic_a[7], ic_a[8], ic_a[9], ic_a[10],
# 1052|   		     ic_a[11], ic_a[12], ic_a[13], ic_a[14], ic_a[15],

Error: COMPILER_WARNING (CWE-457): [#def87]
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:1050:9: warning[-Wmaybe-uninitialized]: 'ic_a' may be used uninitialized
# 1050 |         XSetICValues(p->xic, ic_a[0], ic_a[1], ic_a[2], ic_a[3], ic_a[4],
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1051 |                      ic_a[5], ic_a[6], ic_a[7], ic_a[8], ic_a[9], ic_a[10],
#      |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1052 |                      ic_a[11], ic_a[12], ic_a[13], ic_a[14], ic_a[15],
#      |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1053 |                      ic_a[16], ic_a[17], ic_a[18], NULL);
#      |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:940:25: note: 'ic_a' declared here
#  940 |     XPointer            ic_a[20], pe_a[20], st_a[20];
#      |                         ^~~~
# 1048|       if (ic_cnt > 0) {
# 1049|   	ic_a[ic_cnt] = (XPointer) NULL;
# 1050|-> 	XSetICValues(p->xic, ic_a[0], ic_a[1], ic_a[2], ic_a[3], ic_a[4],
# 1051|   		     ic_a[5], ic_a[6], ic_a[7], ic_a[8], ic_a[9], ic_a[10],
# 1052|   		     ic_a[11], ic_a[12], ic_a[13], ic_a[14], ic_a[15],

Error: GCC_ANALYZER_WARNING (CWE-476): [#def88]
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c: scope_hint: In function 'AllCreateIC'
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c:1320:9: warning[-Wanalyzer-null-dereference]: dereference of NULL '*ve.ic.ic_table'
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c: scope_hint: In function 'AllCreateIC'
libXaw-1.0.15-build/libXaw-1.0.15/src/XawIm.c: scope_hint: In function 'AllCreateIC'
# 1318|   	if (p->xic == NULL)
# 1319|   	    CreateIC(ve->ic.ic_table[0].widget, ve);
# 1320|-> 	SetICFocus(ve->ic.ic_table[0].widget, ve);
# 1321|   	return;
# 1322|       }

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-clang18.1.7
diffbase-analyzer-version-cppcheck2.14.2
diffbase-analyzer-version-gcc14.1.1
diffbase-analyzer-version-gcc-analyzer14.1.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-enabled-pluginsclang, cppcheck, gcc, shellcheck
diffbase-exit-code0
diffbase-hostip-172-16-1-216.us-west-2.compute.internal
diffbase-mock-configfedora-41-x86_64
diffbase-project-namelibXaw-1.0.16-1.fc41
diffbase-store-results-to/tmp/tmpcxbi1s1t/libXaw-1.0.16-1.fc41.tar.xz
diffbase-time-created2024-07-03 14:31:01
diffbase-time-finished2024-07-03 14:32:43
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpcxbi1s1t/libXaw-1.0.16-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpcxbi1s1t/libXaw-1.0.16-1.fc41.src.rpm'
diffbase-tool-versioncsmock-3.5.3-1.el9
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-216.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namelibXaw-1.0.15-3.fc40
store-results-to/tmp/tmp9epc1t0d/libXaw-1.0.15-3.fc40.tar.xz
time-created2024-07-03 14:28:38
time-finished2024-07-03 14:30:45
titleFixed defects
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp9epc1t0d/libXaw-1.0.15-3.fc40.tar.xz' '--gcc-analyze' '/tmp/tmp9epc1t0d/libXaw-1.0.15-3.fc40.src.rpm'
tool-versioncsmock-3.5.3-1.el9