make gcc shut up
If -flto is used then gcc will generate a lot more warnings than before, among them a number of use-without-initialization warnings. Most of them without are false positives, but let's make them go away, because it doesn't really matter.
This commit is contained in:
@@ -83,7 +83,7 @@ struct acpi_fpdt_boot {
|
||||
int acpi_get_boot_usec(usec_t *loader_start, usec_t *loader_exit) {
|
||||
_cleanup_free_ char *buf = NULL;
|
||||
struct acpi_table_header *tbl;
|
||||
size_t l;
|
||||
size_t l = 0;
|
||||
struct acpi_fpdt_header *rec;
|
||||
int r;
|
||||
uint64_t ptr = 0;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "efivars.h"
|
||||
|
||||
int boot_timestamps(const dual_timestamp *n, dual_timestamp *firmware, dual_timestamp *loader) {
|
||||
usec_t x, y, a;
|
||||
usec_t x = 0, y = 0, a;
|
||||
int r;
|
||||
dual_timestamp _n;
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ int efi_get_variable(
|
||||
|
||||
int efi_get_variable_string(sd_id128_t vendor, const char *name, char **p) {
|
||||
_cleanup_free_ void *s = NULL;
|
||||
size_t ss;
|
||||
size_t ss = 0;
|
||||
int r;
|
||||
char *x;
|
||||
|
||||
@@ -393,7 +393,7 @@ fail:
|
||||
static int read_usec(sd_id128_t vendor, const char *name, usec_t *u) {
|
||||
_cleanup_free_ char *j = NULL;
|
||||
int r;
|
||||
uint64_t x;
|
||||
uint64_t x = 0;
|
||||
|
||||
assert(name);
|
||||
assert(u);
|
||||
|
||||
@@ -220,8 +220,8 @@ static int hibernation_partition_size(size_t *size, size_t *used) {
|
||||
|
||||
static bool enough_memory_for_hibernation(void) {
|
||||
_cleanup_free_ char *active = NULL;
|
||||
unsigned long long act;
|
||||
size_t size, used;
|
||||
unsigned long long act = 0;
|
||||
size_t size = 0, used = 0;
|
||||
int r;
|
||||
|
||||
r = hibernation_partition_size(&size, &used);
|
||||
|
||||
@@ -585,7 +585,7 @@ int getpeername_pretty(int fd, char **ret) {
|
||||
return -errno;
|
||||
|
||||
if (sa.sa.sa_family == AF_UNIX) {
|
||||
struct ucred ucred;
|
||||
struct ucred ucred = {};
|
||||
|
||||
/* UNIX connection sockets are anonymous, so let's use
|
||||
* PID/UID as pretty credentials instead */
|
||||
|
||||
+1
-1
@@ -5903,7 +5903,7 @@ int proc_cmdline(char **ret) {
|
||||
int r;
|
||||
|
||||
if (detect_container(NULL) > 0) {
|
||||
char *buf, *p;
|
||||
char *buf = NULL, *p;
|
||||
size_t sz = 0;
|
||||
|
||||
r = read_full_file("/proc/1/cmdline", &buf, &sz);
|
||||
|
||||
Reference in New Issue
Block a user