Skip to content

Commit

Permalink
fix: clean up unused variables to silence compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
heitbaum committed Apr 14, 2024
1 parent 9623b73 commit d002add
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
1 change: 0 additions & 1 deletion src/device-info.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ void info_drive_connection( device_t *device )
{
char *s;
char *p;
char *q;
char *model;
char *vendor;
char *subsystem;
Expand Down
14 changes: 0 additions & 14 deletions src/udevil.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,6 @@ if ( !( cond & G_IO_NVAL ) )

struct udev_device *udevice;
const char *action;
const char *acted = NULL;
char* devnode;
if ( (udevice = udev_monitor_receive_device( umonitor )) )
{
Expand Down Expand Up @@ -637,7 +636,6 @@ char* get_known_filesystems()
// get additional types from files
static const char *type_files[] = { "/proc/filesystems", "/etc/filesystems", NULL };
gchar *filesystems;
GError *error;
gchar **lines;
guint n;
char* str;
Expand All @@ -646,7 +644,6 @@ char* get_known_filesystems()
{
filesystems = NULL;
lines = NULL;
error = NULL;
if ( g_file_get_contents( type_files[i], &filesystems, NULL, NULL ) )
{
lines = g_strsplit (filesystems, "\n", -1);
Expand Down Expand Up @@ -781,7 +778,6 @@ static char* parse_config( int* config_warning )
FILE* file;
char line[ 2048 ];
char* conf_path;
char* sline;
char* equal;
char* var;
char* value;
Expand Down Expand Up @@ -953,7 +949,6 @@ static void wlog( const char* msg, const char* sub1, int volume )
static void lock_log( gboolean lock )
{
FILE* file;
char* name;
struct stat statbuf;

const char* rlock = "/run/lock";
Expand Down Expand Up @@ -1252,7 +1247,6 @@ static gboolean validate_in_groups( const char* name, const char* type,
const char* username )
{
char* list = NULL;
char* str;
char* comma;
char* element;
char* selement;
Expand Down Expand Up @@ -1315,7 +1309,6 @@ static char* validate_options( const char* name, const char* type,
{
char* fulllist = NULL;
char* list;
char* str;
char* comma;
char* element;
char* oelement;
Expand Down Expand Up @@ -1502,7 +1495,6 @@ int user_on_tty()
static void detach_loop( const char* loopdev )
{
char* stdout = NULL;
char* str;
int status = 0;
int exit_status = 1;
gchar *argv[4] = { NULL };
Expand Down Expand Up @@ -1600,7 +1592,6 @@ static char* attach_fd_to_loop( const char* device_file, int fd )
}

char* stdout = NULL;
char* str;
int status = 0;
int exit_status = 1;
gchar *argv[4] = { NULL };
Expand Down Expand Up @@ -1750,7 +1741,6 @@ static gboolean device_is_mounted_mtab( const char* device_file, char** mount_po
GError *error;
guint n;
gboolean ret = FALSE;
char* str;
char* file;
gchar encoded_file[PATH_MAX];
gchar encoded_point[PATH_MAX];
Expand Down Expand Up @@ -1817,8 +1807,6 @@ static gboolean path_is_mounted_mtab( const char* path, char** device_file )
GError *error;
guint n;
gboolean ret = FALSE;
char* str;
char* file;
char* point;
gchar encoded_file[PATH_MAX];
gchar encoded_point[PATH_MAX];
Expand Down Expand Up @@ -4484,7 +4472,6 @@ static int command_remove( CommandData* data )
const char* device_file = data->device_file;
char* str;
char* str2;
int ret = 0;

// got root?
if ( orig_euid != 0 )
Expand Down Expand Up @@ -4717,7 +4704,6 @@ static int command_remove( CommandData* data )

// stop device - contains code from pmount-jjk
char *c;
FILE *f;
path = NULL;

// now extract the part we want, up to the grand-parent of the host
Expand Down

0 comments on commit d002add

Please sign in to comment.