Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
system_vold
Commits
3e971277
Commit
3e971277
authored
11 years ago
by
Mark Salyzyn
Browse files
Options
Download
Email Patches
Plain Diff
vold: suppress unused argument warning messages
Change-Id: Ic1ab533f756fbd44b1f2e5ae12e2f5736ace7740
parent
4ff72251
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
15 deletions
+25
-15
CommandListener.cpp
CommandListener.cpp
+5
-3
DirectVolume.cpp
DirectVolume.cpp
+10
-5
Loop.cpp
Loop.cpp
+1
-1
Volume.cpp
Volume.cpp
+1
-1
cryptfs.c
cryptfs.c
+4
-2
cryptfs.h
cryptfs.h
+1
-2
fstrim.c
fstrim.c
+3
-1
No files found.
CommandListener.cpp
View file @
3e971277
...
...
@@ -52,8 +52,8 @@ CommandListener::CommandListener() :
registerCmd
(
new
FstrimCmd
());
}
void
CommandListener
::
dumpArgs
(
int
argc
,
char
**
argv
,
int
argObscure
)
{
#if DUMP_ARGS
void
CommandListener
::
dumpArgs
(
int
argc
,
char
**
argv
,
int
argObscure
)
{
char
buffer
[
4096
];
char
*
p
=
buffer
;
...
...
@@ -79,15 +79,17 @@ void CommandListener::dumpArgs(int argc, char **argv, int argObscure) {
}
}
SLOGD
(
"%s"
,
buffer
);
#endif
}
#else
void
CommandListener
::
dumpArgs
(
int
/*argc*/
,
char
**
/*argv*/
,
int
/*argObscure*/
)
{
}
#endif
CommandListener
::
DumpCmd
::
DumpCmd
()
:
VoldCommand
(
"dump"
)
{
}
int
CommandListener
::
DumpCmd
::
runCommand
(
SocketClient
*
cli
,
int
argc
,
char
**
argv
)
{
int
/*
argc
*/
,
char
**
/*
argv
*/
)
{
cli
->
sendMsg
(
0
,
"Dumping loop status"
,
false
);
if
(
Loop
::
dumpState
(
cli
))
{
cli
->
sendMsg
(
ResponseCode
::
CommandOkay
,
"Loop dump failed"
,
true
);
...
...
This diff is collapsed.
Click to expand it.
DirectVolume.cpp
View file @
3e971277
...
...
@@ -151,7 +151,8 @@ int DirectVolume::handleBlockEvent(NetlinkEvent *evt) {
return
-
1
;
}
void
DirectVolume
::
handleDiskAdded
(
const
char
*
devpath
,
NetlinkEvent
*
evt
)
{
void
DirectVolume
::
handleDiskAdded
(
const
char
*
/*devpath*/
,
NetlinkEvent
*
evt
)
{
mDiskMajor
=
atoi
(
evt
->
findParam
(
"MAJOR"
));
mDiskMinor
=
atoi
(
evt
->
findParam
(
"MINOR"
));
...
...
@@ -240,7 +241,8 @@ void DirectVolume::handlePartitionAdded(const char *devpath, NetlinkEvent *evt)
}
}
void
DirectVolume
::
handleDiskChanged
(
const
char
*
devpath
,
NetlinkEvent
*
evt
)
{
void
DirectVolume
::
handleDiskChanged
(
const
char
*
/*devpath*/
,
NetlinkEvent
*
evt
)
{
int
major
=
atoi
(
evt
->
findParam
(
"MAJOR"
));
int
minor
=
atoi
(
evt
->
findParam
(
"MINOR"
));
...
...
@@ -273,13 +275,15 @@ void DirectVolume::handleDiskChanged(const char *devpath, NetlinkEvent *evt) {
}
}
void
DirectVolume
::
handlePartitionChanged
(
const
char
*
devpath
,
NetlinkEvent
*
evt
)
{
void
DirectVolume
::
handlePartitionChanged
(
const
char
*
/*devpath*/
,
NetlinkEvent
*
evt
)
{
int
major
=
atoi
(
evt
->
findParam
(
"MAJOR"
));
int
minor
=
atoi
(
evt
->
findParam
(
"MINOR"
));
SLOGD
(
"Volume %s %s partition %d:%d changed
\n
"
,
getLabel
(),
getMountpoint
(),
major
,
minor
);
}
void
DirectVolume
::
handleDiskRemoved
(
const
char
*
devpath
,
NetlinkEvent
*
evt
)
{
void
DirectVolume
::
handleDiskRemoved
(
const
char
*
/*devpath*/
,
NetlinkEvent
*
evt
)
{
int
major
=
atoi
(
evt
->
findParam
(
"MAJOR"
));
int
minor
=
atoi
(
evt
->
findParam
(
"MINOR"
));
char
msg
[
255
];
...
...
@@ -297,7 +301,8 @@ void DirectVolume::handleDiskRemoved(const char *devpath, NetlinkEvent *evt) {
setState
(
Volume
::
State_NoMedia
);
}
void
DirectVolume
::
handlePartitionRemoved
(
const
char
*
devpath
,
NetlinkEvent
*
evt
)
{
void
DirectVolume
::
handlePartitionRemoved
(
const
char
*
/*devpath*/
,
NetlinkEvent
*
evt
)
{
int
major
=
atoi
(
evt
->
findParam
(
"MAJOR"
));
int
minor
=
atoi
(
evt
->
findParam
(
"MINOR"
));
char
msg
[
255
];
...
...
This diff is collapsed.
Click to expand it.
Loop.cpp
View file @
3e971277
...
...
@@ -227,7 +227,7 @@ int Loop::destroyByDevice(const char *loopDevice) {
return
0
;
}
int
Loop
::
destroyByFile
(
const
char
*
loopFile
)
{
int
Loop
::
destroyByFile
(
const
char
*
/*
loopFile
*/
)
{
errno
=
ENOSYS
;
return
-
1
;
}
...
...
This diff is collapsed.
Click to expand it.
Volume.cpp
View file @
3e971277
...
...
@@ -147,7 +147,7 @@ void Volume::handleVolumeShared() {
void
Volume
::
handleVolumeUnshared
()
{
}
int
Volume
::
handleBlockEvent
(
NetlinkEvent
*
evt
)
{
int
Volume
::
handleBlockEvent
(
NetlinkEvent
*
/*
evt
*/
)
{
errno
=
ENOSYS
;
return
-
1
;
}
...
...
This diff is collapsed.
Click to expand it.
cryptfs.c
View file @
3e971277
...
...
@@ -51,6 +51,8 @@
#include "crypto_scrypt.h"
#include "ext4_utils.h"
#define UNUSED __attribute__((unused))
#define DM_CRYPT_BUF_SIZE 4096
#define HASH_COUNT 2000
...
...
@@ -868,7 +870,7 @@ errout:
}
static
void
pbkdf2
(
char
*
passwd
,
unsigned
char
*
salt
,
unsigned
char
*
ikey
,
void
*
params
)
{
static
void
pbkdf2
(
char
*
passwd
,
unsigned
char
*
salt
,
unsigned
char
*
ikey
,
void
*
params
UNUSED
)
{
/* Turn the password into a key and IV that can decrypt the master key */
PKCS5_PBKDF2_HMAC_SHA1
(
passwd
,
strlen
(
passwd
),
salt
,
SALT_LEN
,
HASH_COUNT
,
KEY_LEN_BYTES
+
IV_LEN_BYTES
,
ikey
);
...
...
@@ -1161,7 +1163,7 @@ int cryptfs_restart(void)
return
rc
;
}
static
int
do_crypto_complete
(
char
*
mount_point
)
static
int
do_crypto_complete
(
char
*
mount_point
UNUSED
)
{
struct
crypt_mnt_ftr
crypt_ftr
;
char
encrypted_state
[
PROPERTY_VALUE_MAX
];
...
...
This diff is collapsed.
Click to expand it.
cryptfs.h
View file @
3e971277
...
...
@@ -56,8 +56,7 @@
#define KDF_PBKDF2 1
#define KDF_SCRYPT 2
#define __le32 unsigned int
#define __le16 unsigned short int
/* __le32 and __le16 defined in system/extras/ext4_utils/ext4_utils.h */
#define __le8 unsigned char
struct
crypt_mnt_ftr
{
...
...
This diff is collapsed.
Click to expand it.
fstrim.c
View file @
3e971277
...
...
@@ -37,6 +37,8 @@
#define FSTRIM_WAKELOCK "dofstrim"
#define UNUSED __attribute__((unused))
static
unsigned
long
long
get_boot_time_ms
(
void
)
{
struct
timespec
t
;
...
...
@@ -50,7 +52,7 @@ static unsigned long long get_boot_time_ms(void)
return
time_ms
;
}
static
void
*
do_fstrim_filesystems
(
void
*
ignored
)
static
void
*
do_fstrim_filesystems
(
void
*
ignored
UNUSED
)
{
int
i
;
int
fd
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment