aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2021-09-26 01:56:11 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2021-09-26 01:56:11 +0000
commit20704a875ab548d2861227256ed4ba9b068aa0ac (patch)
treeff17ab625bf0b78214a31660f7a024c0f3e921b2 /lib
parent6aa4d33cce95c534665f3f8e057f13a69ab10835 (diff)
downloadsg3_utils-20704a875ab548d2861227256ed4ba9b068aa0ac.tar.gz
sg_vpd: zoned block dev char vpd: add zone alignment mode and zone starting LBA granularity; gcc -fanalyzer fixes: in sg_pt_linux.c + sg_write_x.c
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@914 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile.am1
-rw-r--r--lib/Makefile.in1
-rw-r--r--lib/sg_pt_freebsd.c2
-rw-r--r--lib/sg_pt_linux.c6
4 files changed, 6 insertions, 4 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 97410dc3..16efe9e5 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -84,6 +84,7 @@ endif
# -Wall is no longer all warnings. Add -W (since renamed to -Wextra) for more
AM_CPPFLAGS = -iquote ${top_srcdir}/include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 $(DBG_CPPFLAGS)
AM_CFLAGS = -Wall -W $(DBG_CFLAGS)
+# AM_CFLAGS = -Wall -W $(DBG_CFLAGS) -fanalyzer
# AM_CFLAGS = -Wall -W -Wextra -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wnull-dereference -Wshadow -Wjump-misses-init
# AM_CFLAGS = -Wall -W -pedantic -std=c11
# AM_CFLAGS = -Wall -W -pedantic -std=c11 --analyze
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 0fdc8a37..458a246a 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -394,6 +394,7 @@ libsgutils2_la_SOURCES = sg_lib.c sg_lib_data.c sg_cmds_basic.c \
# -Wall is no longer all warnings. Add -W (since renamed to -Wextra) for more
AM_CPPFLAGS = -iquote ${top_srcdir}/include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 $(DBG_CPPFLAGS)
AM_CFLAGS = -Wall -W $(DBG_CFLAGS)
+# AM_CFLAGS = -Wall -W $(DBG_CFLAGS) -fanalyzer
# AM_CFLAGS = -Wall -W -Wextra -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wnull-dereference -Wshadow -Wjump-misses-init
# AM_CFLAGS = -Wall -W -pedantic -std=c11
# AM_CFLAGS = -Wall -W -pedantic -std=c11 --analyze
diff --git a/lib/sg_pt_freebsd.c b/lib/sg_pt_freebsd.c
index 47eaf7c4..645d9bef 100644
--- a/lib/sg_pt_freebsd.c
+++ b/lib/sg_pt_freebsd.c
@@ -583,7 +583,7 @@ destruct_scsi_pt_obj(struct sg_pt_base * vp)
if ((ptp = &vp->impl)) {
if (ptp->ccb)
cam_freeccb(ptp->ccb);
- free(ptp);
+ free(vp);
}
}
diff --git a/lib/sg_pt_linux.c b/lib/sg_pt_linux.c
index c65c5f94..6d282f50 100644
--- a/lib/sg_pt_linux.c
+++ b/lib/sg_pt_linux.c
@@ -7,7 +7,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
-/* sg_pt_linux version 1.53 20210830 */
+/* sg_pt_linux version 1.54 20210923 */
#include <stdio.h>
@@ -439,8 +439,8 @@ destruct_scsi_pt_obj(struct sg_pt_base * vp)
ptp->free_nvme_id_ctlp = NULL;
ptp->nvme_id_ctlp = NULL;
}
- if (ptp)
- free(ptp);
+ if (vp)
+ free(vp);
}
}