Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
8be5ec39
Kaydet (Commit)
8be5ec39
authored
Tem 22, 2015
tarafından
Jan Holesovsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
online update: Fix many warnings.
Not all yet, though. Change-Id: Ic4f0fe3ded31d585faefd8bda8ab87f54b88dc6c
üst
b59955bf
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
29 additions
and
26 deletions
+29
-26
Attributes.h
onlineupdate/source/libmar/inc/mozilla/Attributes.h
+1
-1
nss_secutil.c
onlineupdate/source/libmar/sign/nss_secutil.c
+2
-0
mar_extract.c
onlineupdate/source/libmar/src/mar_extract.c
+2
-0
mar.c
onlineupdate/source/libmar/tool/mar.c
+4
-2
cryptox.h
onlineupdate/source/libmar/verify/cryptox.h
+1
-1
mar_verify.c
onlineupdate/source/libmar/verify/mar_verify.c
+2
-1
updatelogging.cxx
onlineupdate/source/update/common/updatelogging.cxx
+4
-4
Attributes.h
onlineupdate/source/update/inc/mozilla/Attributes.h
+1
-1
mar_extract.c
onlineupdate/source/update/src/mar_extract.c
+2
-0
progressui_gtk.cxx
onlineupdate/source/update/updater/progressui_gtk.cxx
+2
-2
updater.cxx
onlineupdate/source/update/updater/updater.cxx
+8
-14
No files found.
onlineupdate/source/libmar/inc/mozilla/Attributes.h
Dosyayı görüntüle @
8be5ec39
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
# define MOZ_HAVE_NORETURN __attribute__((noreturn))
# define MOZ_HAVE_NORETURN __attribute__((noreturn))
# endif
# endif
#elif defined(__GNUC__)
#elif defined(__GNUC__)
# if defined(__GXX_EXPERIMENTAL_CXX0X__) ||
__cplusplus >= 201103L
# if defined(__GXX_EXPERIMENTAL_CXX0X__) ||
(defined(__cplusplus) && __cplusplus >= 201103L)
# define MOZ_HAVE_CXX11_CONSTEXPR
# define MOZ_HAVE_CXX11_CONSTEXPR
# if MOZ_GCC_VERSION_AT_LEAST(4, 8, 0)
# if MOZ_GCC_VERSION_AT_LEAST(4, 8, 0)
# define MOZ_HAVE_CXX11_CONSTEXPR_IN_TEMPLATES
# define MOZ_HAVE_CXX11_CONSTEXPR_IN_TEMPLATES
...
...
onlineupdate/source/libmar/sign/nss_secutil.c
Dosyayı görüntüle @
8be5ec39
...
@@ -66,6 +66,8 @@ GetPasswordString(void *arg, char *prompt)
...
@@ -66,6 +66,8 @@ GetPasswordString(void *arg, char *prompt)
char
phrase
[
200
]
=
{
'\0'
};
char
phrase
[
200
]
=
{
'\0'
};
int
isInputTerminal
=
isatty
(
fileno
(
stdin
));
int
isInputTerminal
=
isatty
(
fileno
(
stdin
));
(
void
)
arg
;
(
void
)
prompt
;
// avoid warnings
#ifndef _WINDOWS
#ifndef _WINDOWS
if
(
isInputTerminal
)
{
if
(
isInputTerminal
)
{
input
=
fopen
(
consoleName
,
"r"
);
input
=
fopen
(
consoleName
,
"r"
);
...
...
onlineupdate/source/libmar/src/mar_extract.c
Dosyayı görüntüle @
8be5ec39
...
@@ -40,6 +40,8 @@ static int mar_test_callback(MarFile *mar, const MarItem *item, void *unused) {
...
@@ -40,6 +40,8 @@ static int mar_test_callback(MarFile *mar, const MarItem *item, void *unused) {
char
buf
[
BLOCKSIZE
];
char
buf
[
BLOCKSIZE
];
int
fd
,
len
,
offset
=
0
;
int
fd
,
len
,
offset
=
0
;
(
void
)
unused
;
// avoid warnings
if
(
mar_ensure_parent_dir
(
item
->
name
))
if
(
mar_ensure_parent_dir
(
item
->
name
))
return
-
1
;
return
-
1
;
...
...
onlineupdate/source/libmar/tool/mar.c
Dosyayı görüntüle @
8be5ec39
...
@@ -35,12 +35,12 @@ int mar_repackage_and_sign(const char *NSSConfigDir,
...
@@ -35,12 +35,12 @@ int mar_repackage_and_sign(const char *NSSConfigDir,
const
char
*
src
,
const
char
*
src
,
const
char
*
dest
);
const
char
*
dest
);
static
void
print_version
()
{
static
void
print_version
(
void
)
{
printf
(
"Version: %s
\n
"
,
MOZ_APP_VERSION
);
printf
(
"Version: %s
\n
"
,
MOZ_APP_VERSION
);
printf
(
"Default Channel ID: %s
\n
"
,
MAR_CHANNEL_ID
);
printf
(
"Default Channel ID: %s
\n
"
,
MAR_CHANNEL_ID
);
}
}
static
void
print_usage
()
{
static
void
print_usage
(
void
)
{
printf
(
"usage:
\n
"
);
printf
(
"usage:
\n
"
);
printf
(
"Create a MAR file:
\n
"
);
printf
(
"Create a MAR file:
\n
"
);
printf
(
" mar [-H MARChannelID] [-V ProductVersion] [-C workingDir] "
printf
(
" mar [-H MARChannelID] [-V ProductVersion] [-C workingDir] "
...
@@ -99,6 +99,8 @@ static void print_usage() {
...
@@ -99,6 +99,8 @@ static void print_usage() {
static
int
mar_test_callback
(
MarFile
*
mar
,
static
int
mar_test_callback
(
MarFile
*
mar
,
const
MarItem
*
item
,
const
MarItem
*
item
,
void
*
unused
)
{
void
*
unused
)
{
(
void
)
mar
;
(
void
)
unused
;
// avoid warnings
printf
(
"%u
\t
0%o
\t
%s
\n
"
,
item
->
length
,
item
->
flags
,
item
->
name
);
printf
(
"%u
\t
0%o
\t
%s
\n
"
,
item
->
length
,
item
->
flags
,
item
->
name
);
return
0
;
return
0
;
}
}
...
...
onlineupdate/source/libmar/verify/cryptox.h
Dosyayı görüntüle @
8be5ec39
...
@@ -57,7 +57,7 @@ CryptoX_Result NSS_VerifySignature(VFYContext * const *ctx ,
...
@@ -57,7 +57,7 @@ CryptoX_Result NSS_VerifySignature(VFYContext * const *ctx ,
#define CryptoX_FreeCertificate(cert) \
#define CryptoX_FreeCertificate(cert) \
CERT_DestroyCertificate(*cert)
CERT_DestroyCertificate(*cert)
#elif
MACOSX
#elif
defined(MACOSX)
#define CryptoX_InvalidHandleValue NULL
#define CryptoX_InvalidHandleValue NULL
#define CryptoX_ProviderHandle void*
#define CryptoX_ProviderHandle void*
...
...
onlineupdate/source/libmar/verify/mar_verify.c
Dosyayı görüntüle @
8be5ec39
...
@@ -194,7 +194,6 @@ mar_extract_and_verify_signatures_fp(FILE *fp,
...
@@ -194,7 +194,6 @@ mar_extract_and_verify_signatures_fp(FILE *fp,
CryptoX_ProviderHandle
provider
,
CryptoX_ProviderHandle
provider
,
CryptoX_PublicKey
*
keys
,
CryptoX_PublicKey
*
keys
,
uint32_t
keyCount
)
{
uint32_t
keyCount
)
{
char
buf
[
5
]
=
{
0
};
uint32_t
signatureCount
,
signatureLen
,
numVerified
=
0
;
uint32_t
signatureCount
,
signatureLen
,
numVerified
=
0
;
uint32_t
signatureAlgorithmIDs
[
MAX_SIGNATURES
];
uint32_t
signatureAlgorithmIDs
[
MAX_SIGNATURES
];
int
rv
=
-
1
;
int
rv
=
-
1
;
...
@@ -346,6 +345,8 @@ mar_verify_signatures_for_fp(FILE *fp,
...
@@ -346,6 +345,8 @@ mar_verify_signatures_for_fp(FILE *fp,
uint32_t
i
;
uint32_t
i
;
int
rv
=
CryptoX_Error
;
int
rv
=
CryptoX_Error
;
(
void
)
provider
;
(
void
)
keys
;
// avoid warnings
memset
(
signatureHandles
,
0
,
sizeof
(
signatureHandles
));
memset
(
signatureHandles
,
0
,
sizeof
(
signatureHandles
));
memset
(
signatureLengths
,
0
,
sizeof
(
signatureLengths
));
memset
(
signatureLengths
,
0
,
sizeof
(
signatureLengths
));
...
...
onlineupdate/source/update/common/updatelogging.cxx
Dosyayı görüntüle @
8be5ec39
...
@@ -18,7 +18,7 @@ UpdateLog::UpdateLog() : logFP(nullptr)
...
@@ -18,7 +18,7 @@ UpdateLog::UpdateLog() : logFP(nullptr)
{
{
}
}
void
UpdateLog
::
Init
(
NS_tchar
*
sourcePath
,
void
UpdateLog
::
Init
(
NS_tchar
*
sourcePath
Param
,
const
NS_tchar
*
fileName
,
const
NS_tchar
*
fileName
,
const
NS_tchar
*
alternateFileName
,
const
NS_tchar
*
alternateFileName
,
bool
append
)
bool
append
)
...
@@ -26,14 +26,14 @@ void UpdateLog::Init(NS_tchar* sourcePath,
...
@@ -26,14 +26,14 @@ void UpdateLog::Init(NS_tchar* sourcePath,
if
(
logFP
)
if
(
logFP
)
return
;
return
;
this
->
sourcePath
=
sourcePath
;
sourcePath
=
sourcePathParam
;
NS_tchar
logFile
[
MAXPATHLEN
];
NS_tchar
logFile
[
MAXPATHLEN
];
NS_tsnprintf
(
logFile
,
sizeof
(
logFile
)
/
sizeof
(
logFile
[
0
]),
NS_tsnprintf
(
logFile
,
sizeof
(
logFile
)
/
sizeof
(
logFile
[
0
]),
NS_T
(
"%s/%s"
),
sourcePath
,
fileName
);
NS_T
(
"%s/%s"
),
sourcePath
Param
,
fileName
);
if
(
alternateFileName
&&
NS_taccess
(
logFile
,
F_OK
))
{
if
(
alternateFileName
&&
NS_taccess
(
logFile
,
F_OK
))
{
NS_tsnprintf
(
logFile
,
sizeof
(
logFile
)
/
sizeof
(
logFile
[
0
]),
NS_tsnprintf
(
logFile
,
sizeof
(
logFile
)
/
sizeof
(
logFile
[
0
]),
NS_T
(
"%s/%s"
),
sourcePath
,
alternateFileName
);
NS_T
(
"%s/%s"
),
sourcePath
Param
,
alternateFileName
);
}
}
logFP
=
NS_tfopen
(
logFile
,
append
?
NS_T
(
"a"
)
:
NS_T
(
"w"
));
logFP
=
NS_tfopen
(
logFile
,
append
?
NS_T
(
"a"
)
:
NS_T
(
"w"
));
...
...
onlineupdate/source/update/inc/mozilla/Attributes.h
Dosyayı görüntüle @
8be5ec39
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
# define MOZ_HAVE_NORETURN __attribute__((noreturn))
# define MOZ_HAVE_NORETURN __attribute__((noreturn))
# endif
# endif
#elif defined(__GNUC__)
#elif defined(__GNUC__)
# if defined(__GXX_EXPERIMENTAL_CXX0X__) ||
__cplusplus >= 201103L
# if defined(__GXX_EXPERIMENTAL_CXX0X__) ||
(defined(__cplusplus) && __cplusplus >= 201103L)
# define MOZ_HAVE_CXX11_CONSTEXPR
# define MOZ_HAVE_CXX11_CONSTEXPR
# if MOZ_GCC_VERSION_AT_LEAST(4, 8, 0)
# if MOZ_GCC_VERSION_AT_LEAST(4, 8, 0)
# define MOZ_HAVE_CXX11_CONSTEXPR_IN_TEMPLATES
# define MOZ_HAVE_CXX11_CONSTEXPR_IN_TEMPLATES
...
...
onlineupdate/source/update/src/mar_extract.c
Dosyayı görüntüle @
8be5ec39
...
@@ -40,6 +40,8 @@ static int mar_test_callback(MarFile *mar, const MarItem *item, void *unused) {
...
@@ -40,6 +40,8 @@ static int mar_test_callback(MarFile *mar, const MarItem *item, void *unused) {
char
buf
[
BLOCKSIZE
];
char
buf
[
BLOCKSIZE
];
int
fd
,
len
,
offset
=
0
;
int
fd
,
len
,
offset
=
0
;
(
void
)
unused
;
// avoid warnings
if
(
mar_ensure_parent_dir
(
item
->
name
))
if
(
mar_ensure_parent_dir
(
item
->
name
))
return
-
1
;
return
-
1
;
...
...
onlineupdate/source/update/updater/progressui_gtk.cxx
Dosyayı görüntüle @
8be5ec39
...
@@ -26,7 +26,7 @@ static GtkWidget *sProgressBar;
...
@@ -26,7 +26,7 @@ static GtkWidget *sProgressBar;
static
const
char
*
sProgramPath
;
static
const
char
*
sProgramPath
;
static
gboolean
static
gboolean
UpdateDialog
(
gpointer
data
)
UpdateDialog
(
gpointer
/*data*/
)
{
{
if
(
sQuit
)
if
(
sQuit
)
{
{
...
@@ -43,7 +43,7 @@ UpdateDialog(gpointer data)
...
@@ -43,7 +43,7 @@ UpdateDialog(gpointer data)
}
}
static
gboolean
static
gboolean
OnDeleteEvent
(
GtkWidget
*
widget
,
GdkEvent
*
event
,
gpointer
user_data
)
OnDeleteEvent
(
GtkWidget
*
/*widget*/
,
GdkEvent
*
/*event*/
,
gpointer
/*user_data*/
)
{
{
return
TRUE
;
return
TRUE
;
}
}
...
...
onlineupdate/source/update/updater/updater.cxx
Dosyayı görüntüle @
8be5ec39
...
@@ -64,7 +64,9 @@
...
@@ -64,7 +64,9 @@
#define PROGRESS_FINISH_SIZE 5.0f
#define PROGRESS_FINISH_SIZE 5.0f
// Amount of time in ms to wait for the parent process to close
// Amount of time in ms to wait for the parent process to close
#ifdef WNT
#define PARENT_WAIT 5000
#define PARENT_WAIT 5000
#endif
#if defined(MACOSX)
#if defined(MACOSX)
// These functions are defined in launchchild_osx.mm
// These functions are defined in launchchild_osx.mm
...
@@ -72,10 +74,6 @@ void LaunchChild(int argc, char **argv);
...
@@ -72,10 +74,6 @@ void LaunchChild(int argc, char **argv);
void
LaunchMacPostProcess
(
const
char
*
aAppBundle
);
void
LaunchMacPostProcess
(
const
char
*
aAppBundle
);
#endif
#endif
#ifndef _O_BINARY
# define _O_BINARY 0
#endif
#ifndef NULL
#ifndef NULL
# define NULL (0)
# define NULL (0)
#endif
#endif
...
@@ -141,18 +139,12 @@ static bool sUseHardLinks = true;
...
@@ -141,18 +139,12 @@ static bool sUseHardLinks = true;
// This variable lives in libbz2. It's declared in bzlib_private.h, so we just
// This variable lives in libbz2. It's declared in bzlib_private.h, so we just
// declare it here to avoid including that entire header file.
// declare it here to avoid including that entire header file.
#define BZ2_CRC32TABLE_UNDECLARED
#if defined(HAVE_GCC_VISIBILITY_FEATURE)
#if defined(HAVE_GCC_VISIBILITY_FEATURE)
extern
"C"
__attribute__
((
visibility
(
"default"
)))
unsigned
int
BZ2_crc32Table
[
256
];
extern
"C"
__attribute__
((
visibility
(
"default"
)))
unsigned
int
BZ2_crc32Table
[
256
];
#undef BZ2_CRC32TABLE_UNDECLARED
#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
extern
"C"
__global
unsigned
int
BZ2_crc32Table
[
256
];
extern
"C"
__global
unsigned
int
BZ2_crc32Table
[
256
];
#undef BZ2_CRC32TABLE_UNDECLARED
#else
#endif
#if defined(BZ2_CRC32TABLE_UNDECLARED)
extern
"C"
unsigned
int
BZ2_crc32Table
[
256
];
extern
"C"
unsigned
int
BZ2_crc32Table
[
256
];
#undef BZ2_CRC32TABLE_UNDECLARED
#endif
#endif
static
unsigned
int
static
unsigned
int
...
@@ -1825,8 +1817,10 @@ LaunchCallbackApp(const NS_tchar *workingDir,
...
@@ -1825,8 +1817,10 @@ LaunchCallbackApp(const NS_tchar *workingDir,
}
}
#if defined(USE_EXECV)
#if defined(USE_EXECV)
(
void
)
argc
;
(
void
)
usingService
;
// avoid warnings
execv
(
argv
[
0
],
argv
);
execv
(
argv
[
0
],
argv
);
#elif defined(MACOSX)
#elif defined(MACOSX)
(
void
)
usingService
;
// avoid warnings
LaunchChild
(
argc
,
argv
);
LaunchChild
(
argc
,
argv
);
#elif defined(WNT)
#elif defined(WNT)
// Do not allow the callback to run when running an update through the
// Do not allow the callback to run when running an update through the
...
@@ -1957,7 +1951,7 @@ CopyInstallDirToDestDir()
...
@@ -1957,7 +1951,7 @@ CopyInstallDirToDestDir()
// These files should not be copied over to the updated app
// These files should not be copied over to the updated app
#ifdef WNT
#ifdef WNT
#define SKIPLIST_COUNT 3
#define SKIPLIST_COUNT 3
#elif
MACOSX
#elif
defined(MACOSX)
#define SKIPLIST_COUNT 0
#define SKIPLIST_COUNT 0
#else
#else
#define SKIPLIST_COUNT 2
#define SKIPLIST_COUNT 2
...
@@ -1992,7 +1986,7 @@ ProcessReplaceRequest()
...
@@ -1992,7 +1986,7 @@ ProcessReplaceRequest()
NS_tchar
destDir
[
MAXPATHLEN
];
NS_tchar
destDir
[
MAXPATHLEN
];
NS_tsnprintf
(
destDir
,
sizeof
(
destDir
)
/
sizeof
(
destDir
[
0
]),
NS_tsnprintf
(
destDir
,
sizeof
(
destDir
)
/
sizeof
(
destDir
[
0
]),
NS_T
(
"%s/Contents"
),
gInstallDirPath
);
NS_T
(
"%s/Contents"
),
gInstallDirPath
);
#elif
WNT
#elif
defined(WNT)
// Windows preserves the case of the file/directory names. We use the
// Windows preserves the case of the file/directory names. We use the
// GetLongPathName API in order to get the correct case for the directory
// GetLongPathName API in order to get the correct case for the directory
// name, so that if the user has used a different case when launching the
// name, so that if the user has used a different case when launching the
...
@@ -2190,7 +2184,7 @@ GetUpdateFileName(NS_tchar *fileName, int maxChars)
...
@@ -2190,7 +2184,7 @@ GetUpdateFileName(NS_tchar *fileName, int maxChars)
}
}
static
void
static
void
UpdateThreadFunc
(
void
*
param
)
UpdateThreadFunc
(
void
*
/*param*/
)
{
{
// open ZIP archive and process...
// open ZIP archive and process...
int
rv
;
int
rv
;
...
...
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