libgweather-4.4.2-1.fc41
List of Defects
Error: CPPCHECK_WARNING: [#def1]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/gweather-info.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING (CWE-628): [#def2]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/gweather-info.c:432: warning[invalidFunctionArg]: Invalid log10() argument nr 1. The value is -0.1636661211 but the valid values are '4.94066e-324:'.
# 430| }
# 431|
# 432|-> double tmp = log10 (esurf / 6.11);
# 433|
# 434| return TEMP_C_TO_F (tmp * 237.7 / (tmp + 7.5));
Error: CPPCHECK_WARNING: [#def3]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/gweather-location.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def4]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/gweather-private.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def5]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/tests/gweather-test-utils.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def6]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/tests/metar.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-688): [#def7]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/tests/metar.c: scope_hint: In function ‘parse_metar_stations’
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/tests/metar.c:115:37: warning[-Wanalyzer-null-argument]: use of NULL ‘contents’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
# 113| int i;
# 114|
# 115|-> doc = xmlParseMemory (contents, strlen (contents));
# 116|
# 117| if (doc == NULL)
Error: CLANG_WARNING: [#def8]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/tests/metar.c:134:21: warning[core.NullDereference]: Access to field 'nodesetval' results in a dereference of a null pointer (loaded from variable 'result')
# 132| num_stations = 0;
# 133|
# 134|-> for (i = 0; i < result->nodesetval->nodeNr; i++) {
# 135| xmlNodePtr node;
# 136| char *station_id;
Error: GCC_ANALYZER_WARNING (CWE-688): [#def9]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/tests/metar.c:161:21: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
/usr/include/glib-2.0/glib/gstring.h:37: included_from: Included from here.
/usr/include/glib-2.0/glib/giochannel.h:36: included_from: Included from here.
/usr/include/glib-2.0/glib.h:56: included_from: Included from here.
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/tests/gweather-test-utils.h:9: included_from: Included from here.
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/tests/metar.c:9: included_from: Included from here.
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/tests/metar.c:158:30: note: in expansion of macro ‘g_strdup’
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/tests/metar.c: scope_hint: In function ‘parse_metar_stations’
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
# 159| xmlFree (val);
# 160|
# 161|-> if (strlen (station_id) != 4) {
# 162| g_free (station_id);
# 163| station_id = NULL;
Error: CPPCHECK_WARNING: [#def10]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/tests/test_libgweather.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def11]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/tests/timezones.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def12]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/third-party/kdtree.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def13]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/third-party/kdtree.c:271:30: warning[core.UndefinedBinaryOperatorResult]: The right operand of '-' is a garbage value due to array index out of bounds
# 269| dist_sq = 0;
# 270| for(i=0; i<dim; i++) {
# 271|-> dist_sq += SQ(node->pos[i] - pos[i]);
# 272| }
# 273| if(dist_sq <= SQ(range)) {
Error: CLANG_WARNING: [#def14]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/third-party/kdtree.c:381:30: warning[core.UndefinedBinaryOperatorResult]: The right operand of '-' is a garbage value due to array index out of bounds
# 379| dist_sq = 0;
# 380| for(i=0; i < rect->dim; i++) {
# 381|-> dist_sq += SQ(node->pos[i] - pos[i]);
# 382| }
# 383| if (dist_sq < *result_dist_sq) {
Error: CLANG_WARNING: [#def15]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/third-party/kdtree.c:436:32: warning[core.UndefinedBinaryOperatorResult]: The right operand of '-' is a garbage value due to array index out of bounds
# 434| dist_sq = 0;
# 435| for (i = 0; i < kd->dim; i++)
# 436|-> dist_sq += SQ(result->pos[i] - pos[i]);
# 437|
# 438| /* Search for the nearest neighbour recursively */
Error: CLANG_WARNING: [#def16]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/third-party/kdtree.c:489:3: warning[unix.Malloc]: Argument to free() is the address of the static variable 'sbuf', which is not memory allocated by malloc()
# 487| if(tree->dim > 16)
# 488| #endif
# 489|-> free(buf);
# 490| return res;
# 491| }
Error: CLANG_WARNING: [#def17]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/third-party/kdtree.c:591:3: warning[unix.Malloc]: Argument to free() is the address of the static variable 'sbuf', which is not memory allocated by malloc()
# 589| if(kd->dim > 16)
# 590| #endif
# 591|-> free(buf);
# 592| return res;
# 593| }
Error: CLANG_WARNING: [#def18]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/third-party/kdtree.c:736:14: warning[core.UndefinedBinaryOperatorResult]: The left operand of '<' is a garbage value due to array index out of bounds
# 734|
# 735| for (i=0; i < rect->dim; i++) {
# 736|-> if (pos[i] < rect->min[i]) {
# 737| rect->min[i] = pos[i];
# 738| }
Error: CPPCHECK_WARNING: [#def19]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/tools/test_metar.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def20]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/tools/test_sun_moon.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def21]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/weather-iwin.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def22]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/weather-metar.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def23]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/weather-metar.c: scope_hint: In function ‘metar_tok_temp’
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/weather-metar.c:256:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘psep’
# 254|
# 255| psep = strchr (tokp, '/');
# 256|-> *psep = 0;
# 257| ptemp = tokp;
# 258| pdew = psep + 1;
Error: CPPCHECK_WARNING: [#def24]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/weather-metno.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def25]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/weather-moon.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def26]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/weather-nws.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def27]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/weather-nws.c:609:28: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 607| if (weather != NWS_WEATHER_FOG) {
# 608| conditions.qualifier = GWEATHER_QUALIFIER_FREEZING;
# 609|-> } else if (strcmp (coverage, "areas") == 0) {
# 610| conditions.qualifier = GWEATHER_QUALIFIER_PARTIAL;
# 611| } else if (strcmp (coverage, "patchy") == 0) {
Error: CPPCHECK_WARNING: [#def28]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/weather-owm.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING (CWE-457): [#def29]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/weather-owm.c:174: error[uninitvar]: Uninitialized variables: &ref.sky, &ref.condition
# 172| ref.symbol = strtol ((char *) val, NULL, 0) - 1;
# 173| xmlFree (val);
# 174|-> obj = bsearch (&ref, symbols, G_N_ELEMENTS (symbols), sizeof (struct owm_symbol), symbol_compare);
# 175|
# 176| if (obj == NULL) {
Error: GCC_ANALYZER_WARNING (CWE-476): [#def30]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/weather-owm.c: scope_hint: In function ‘parse_forecast_xml’
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/weather-owm.c:375:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
/usr/lib64/glib-2.0/include/glibconfig.h:9: included_from: Included from here.
/usr/include/glib-2.0/glib/gtypes.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib/galloca.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib.h:32: included_from: Included from here.
/usr/include/glib-2.0/gobject/gbinding.h:30: included_from: Included from here.
/usr/include/glib-2.0/glib-object.h:24: included_from: Included from here.
/usr/include/glib-2.0/gio/gioenums.h:30: included_from: Included from here.
/usr/include/glib-2.0/gio/giotypes.h:30: included_from: Included from here.
/usr/include/glib-2.0/gio/gio.h:28: included_from: Included from here.
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/gweather-private.h:12: included_from: Included from here.
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/weather-owm.c:9: included_from: Included from here.
/usr/include/glib-2.0/glib/gmacros.h:1243:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’
/usr/include/glib-2.0/glib/gmacros.h:1244:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’
/usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/weather-owm.c:335:5: note: in expansion of macro ‘g_return_val_if_fail’
/usr/include/glib-2.0/glib.h:64: included_from: Included from here.
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/weather-owm.c:335:5: note: in expansion of macro ‘g_return_val_if_fail’
# 373| info = make_info_from_node (original_info, node);
# 374|
# 375|-> info->forecast_list = g_slist_append (info->forecast_list, info);
# 376| }
# 377|
Error: CPPCHECK_WARNING: [#def31]
libgweather-4.4.2-build/libgweather-4.4.2/libgweather/weather-sun.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def32]
libgweather-4.4.2-build/libgweather-4.4.2/redhat-linux-build/tmp-introspecti5zcjfqy/GWeather-4.0.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def33]
libgweather-4.4.2-build/libgweather-4.4.2/redhat-linux-build/tmp-introspecti5zcjfqy/GWeather-4.0.c:799:27: warning[core.NullDereference]: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')
Scan Properties
analyzer-version-clang | 18.1.7 |
analyzer-version-cppcheck | 2.14.2 |
analyzer-version-gcc | 14.1.1 |
analyzer-version-gcc-analyzer | 14.1.1 |
analyzer-version-shellcheck | 0.10.0 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-23.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | libgweather-4.4.2-1.fc41 |
store-results-to | /tmp/tmpnhj041zk/libgweather-4.4.2-1.fc41.tar.xz |
time-created | 2024-07-03 14:44:42 |
time-finished | 2024-07-03 14:46:09 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpnhj041zk/libgweather-4.4.2-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpnhj041zk/libgweather-4.4.2-1.fc41.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |