1nwf / Produx-v2

Value assigned to a variable is never read before being overwritten SCC-SA4006
Bug risk
Critical
7 months ago2 years old
this value of err is never used
19	announcementCount, err := db.DB.ProductFieldPostCount(productIdInt, "announcements", true)
20	underReviewCount, err := db.DB.ProductFieldPostCount(productIdInt, "under-review", false)
21	workingOnCount, err := db.DB.ProductFieldPostCount(productIdInt, "working-on", false)
22	doneCount, err := db.DB.ProductFieldPostCount(productIdInt, "done", false)23	return c.JSON(fiber.Map{
24		"bugs":          bugCount,
25		"announcements": announcementCount,
this value of err is never used
18	suggestionCount, err := db.DB.ProductFieldPostCount(productIdInt, "suggestions", true)
19	announcementCount, err := db.DB.ProductFieldPostCount(productIdInt, "announcements", true)
20	underReviewCount, err := db.DB.ProductFieldPostCount(productIdInt, "under-review", false)
21	workingOnCount, err := db.DB.ProductFieldPostCount(productIdInt, "working-on", false)22	doneCount, err := db.DB.ProductFieldPostCount(productIdInt, "done", false)
23	return c.JSON(fiber.Map{
24		"bugs":          bugCount,
this value of err is never used
17	bugCount, err := db.DB.ProductFieldPostCount(productIdInt, "bugs", true)
18	suggestionCount, err := db.DB.ProductFieldPostCount(productIdInt, "suggestions", true)
19	announcementCount, err := db.DB.ProductFieldPostCount(productIdInt, "announcements", true)
20	underReviewCount, err := db.DB.ProductFieldPostCount(productIdInt, "under-review", false)21	workingOnCount, err := db.DB.ProductFieldPostCount(productIdInt, "working-on", false)
22	doneCount, err := db.DB.ProductFieldPostCount(productIdInt, "done", false)
23	return c.JSON(fiber.Map{
this value of err is never used
16	}
17	bugCount, err := db.DB.ProductFieldPostCount(productIdInt, "bugs", true)
18	suggestionCount, err := db.DB.ProductFieldPostCount(productIdInt, "suggestions", true)
19	announcementCount, err := db.DB.ProductFieldPostCount(productIdInt, "announcements", true)20	underReviewCount, err := db.DB.ProductFieldPostCount(productIdInt, "under-review", false)
21	workingOnCount, err := db.DB.ProductFieldPostCount(productIdInt, "working-on", false)
22	doneCount, err := db.DB.ProductFieldPostCount(productIdInt, "done", false)
this value of err is never used
15		})
16	}
17	bugCount, err := db.DB.ProductFieldPostCount(productIdInt, "bugs", true)
18	suggestionCount, err := db.DB.ProductFieldPostCount(productIdInt, "suggestions", true)19	announcementCount, err := db.DB.ProductFieldPostCount(productIdInt, "announcements", true)
20	underReviewCount, err := db.DB.ProductFieldPostCount(productIdInt, "under-review", false)
21	workingOnCount, err := db.DB.ProductFieldPostCount(productIdInt, "working-on", false)