[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-21
From: |
Daniele Forsi |
Subject: |
[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-217-g245dde2 |
Date: |
Tue, 10 May 2011 11:53:05 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "libgnokii and core programs".
The branch, master has been updated
via 245dde21c5fe21ce4b01f646cfd61ee66e3facdd (commit)
via 42ce2c099914bed85c705557692f8aa5e21e1a36 (commit)
from ef4fa2dfb44feb2f0c88efedfa2ed0e015ebee34 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=245dde21c5fe21ce4b01f646cfd61ee66e3facdd
commit 245dde21c5fe21ce4b01f646cfd61ee66e3facdd
Author: Daniele Forsi <address@hidden>
Date: Tue May 10 13:50:49 2011 +0200
Fix some "variable set but not used" warnings
Fixes:
nk7110.c:685:16: warning: variable 'subblockcount' set but not used
[-Wunused-but-set-variable]
nk7110.c:683:17: warning: variable 'blockstart' set but not used
[-Wunused-but-set-variable]
nk7110.c:1666:9: warning: variable 'year' set but not used
[-Wunused-but-set-variable]
nk7110.c:2183:26: warning: variable 'pad' set but not used
[-Wunused-but-set-variable]
nk6510.c:1460:11: warning: variable 'error' set but not used
[-Wunused-but-set-variable]
nk6510.c:1645:22: warning: variable 'tota_len' set but not used
[-Wunused-but-set-variable]
nk6510.c:2546:16: warning: variable 'fll' set but not used
[-Wunused-but-set-variable]
nk6510.c:2544:12: warning: variable 'frame_length' set but not used
[-Wunused-but-set-variable]
gsm-sms.c:1596:9: warning: variable 'sms' set but not used
[-Wunused-but-set-variable]
xgnokii.c:2146:9: warning: variable âgcâ set but not used
[-Wunused-but-set-variable]
xgnokii.c:2243:9: warning: variable âgcâ set but not used
[-Wunused-but-set-variable]
Does NOT fix:
nk3110.c:968:13: warning: variable 'U2' set but not used
[-Wunused-but-set-variable]
nk3110.c:968:9: warning: variable 'U1' set but not used
[-Wunused-but-set-variable]
nk3110.c:968:5: warning: variable 'U0' set but not used
[-Wunused-but-set-variable]
nk3110.c:1230:34: warning: variable 'model_length' set but not used
[-Wunused-but-set-variable]
gsm-mms.c:574:38: warning: variable 'pdu_start' set but not used
[-Wunused-but-set-variable]
gnokii-sms.c:274:8: warning: variable âchars_readâ set but not used
[-Wunused-but-set-variable]
diff --git a/common/gsm-sms.c b/common/gsm-sms.c
index a692c9c..7c6aa02 100644
--- a/common/gsm-sms.c
+++ b/common/gsm-sms.c
@@ -1593,14 +1593,12 @@ GNOKII_API gn_error gn_sms_send(gn_data *data, struct
gn_statemachine *state)
{
int i, total;
int enc_chars, ext_chars;
- gn_sms sms;
dprintf("=====> ENTER gn_sms_send()\n");
/*
* count -- number of SMS to be sent
* total -- total number of octets to be sent
*/
- sms = *data->sms;
/* Convert all the input strings to UTF-8 */
if (data->sms->dcs.u.general.alphabet != GN_SMS_DCS_8bit) {
diff --git a/common/phones/nk6510.c b/common/phones/nk6510.c
index 9d54b80..c22801e 100644
--- a/common/phones/nk6510.c
+++ b/common/phones/nk6510.c
@@ -1462,6 +1462,8 @@ static gn_error NK6510_GetSMSnoValidate(gn_data *data,
struct gn_statemachine *s
dprintf("Getting SMS (no validate) ...\n");
error = NK6510_GetSMSMessageStatus(data, state);
+ if (error)
+ return error;
if ((data->raw_sms->memory_type == GN_MT_IN) ||
(data->raw_sms->memory_type == GN_MT_OU)) {
if (data->raw_sms->number > 1024) {
@@ -2543,7 +2545,6 @@ static gn_error NK6510_IncomingFile(int messagetype,
unsigned char *message, int
{
int i, j, frame_length;
gn_file *file = NULL;
- gn_file_list *fll;
gn_error error = GN_ERR_NONE;
switch (message[3]) {
@@ -2580,7 +2581,6 @@ static gn_error NK6510_IncomingFile(int messagetype,
unsigned char *message, int
/* frame length */
frame_length = 256 * message[8] + message[9];
file = data->file;
- fll = data->file_list;
char_unicode_decode(file->name, message + 10, 184);
dprintf("Filename: %s\n", file->name);
if (message[196] != 0xff) {
diff --git a/common/phones/nk7110.c b/common/phones/nk7110.c
index 9aeb84f..c1dffe2 100644
--- a/common/phones/nk7110.c
+++ b/common/phones/nk7110.c
@@ -682,7 +682,6 @@ static gn_error NK7110_IncomingPhonebook(int messagetype,
unsigned char *message
nk7110_driver_instance *drvinst = DRVINSTANCE(state);
unsigned char *blockstart;
unsigned char blocks;
- unsigned char subblockcount;
int memtype, location, memtype_req;
switch (message[3]) {
@@ -752,8 +751,7 @@ static gn_error NK7110_IncomingPhonebook(int messagetype,
unsigned char *message
dprintf("Received phonebook info\n");
blocks = message[17];
blockstart = message + 18;
- subblockcount = 0;
- return phonebook_decode(message + 18, length - 17, data,
blocks, message[11], 8);
+ return phonebook_decode(blockstart, length - 17, data, blocks,
message[11], 8);
case 0x0c:
if (message[6] == 0x0f) {
switch (message[10]) {
@@ -1663,11 +1661,10 @@ static gn_error NK7110_SetAlarm(gn_data *data, struct
gn_statemachine *state)
static gn_error NK7110_IncomingCalendar(int messagetype, unsigned char
*message, int length, gn_data *data, struct gn_statemachine *state)
{
gn_error e = GN_ERR_NONE;
- int i, year;
+ int i;
if (!data || !data->calnote) return GN_ERR_INTERNALERROR;
- year = data->calnote->time.year;
switch (message[3]) {
case NK7110_SUBCAL_NOTE_RCVD:
calnote_decode(message, length, data);
@@ -2180,7 +2177,7 @@ static gn_error NK7110_IncomingSecurity(int messagetype,
unsigned char *message,
/*****************/
static gn_error NK7110_IncomingWAP(int messagetype, unsigned char *message,
int length, gn_data *data, struct gn_statemachine *state)
{
- int string_length, pos, pad = 0;
+ int string_length, pos;
switch (message[3]) {
case 0x02:
@@ -2245,7 +2242,6 @@ static gn_error NK7110_IncomingWAP(int messagetype,
unsigned char *message, int
char_unicode_decode(data->wap_setting->name, message +
5, string_length);
dprintf("Name: %s\n", data->wap_setting->name);
pos = string_length + 5;
- if (!(string_length % 4)) pad = 1;
string_length = message[pos++] << 1;
if (!data->wap_setting->read_before_write)
diff --git a/xgnokii/xgnokii.c b/xgnokii/xgnokii.c
index 9c933cc..def5af4 100644
--- a/xgnokii/xgnokii.c
+++ b/xgnokii/xgnokii.c
@@ -2142,8 +2142,6 @@ static void TopLevelWindow(void)
{
GtkWidget *drawing_area;
GdkBitmap *mask;
- GtkStyle *style;
- GdkGC *gc;
struct sigaction act;
GUI_MainWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);
@@ -2168,8 +2166,6 @@ static void TopLevelWindow(void)
&GUI_MainWindow->style->white, (gchar
**) XPM_background);
// gdk_window_set_icon_name (GUI_MainWindow->window, "XXX");
- style = gtk_widget_get_default_style();
- gc = style->black_gc;
/* Create the drawing area */
drawing_area = gtk_drawing_area_new();
@@ -2240,7 +2236,6 @@ static void SplashScreen(void)
GdkPixmap *gdk_pixmap;
GdkBitmap *mask;
GtkStyle *style;
- GdkGC *gc;
SplashWindow = gtk_window_new(GTK_WINDOW_POPUP);
gtk_widget_realize(SplashWindow);
@@ -2249,7 +2244,6 @@ static void SplashScreen(void)
gtk_window_position(GTK_WINDOW(SplashWindow), GTK_WIN_POS_CENTER);
style = gtk_widget_get_default_style();
- gc = style->black_gc;
gdk_pixmap = gdk_pixmap_create_from_xpm_d(SplashWindow->window, &mask,
&style->bg[GTK_STATE_NORMAL],
XPM_logo);
pixmap = gtk_pixmap_new(gdk_pixmap, mask);
http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=42ce2c099914bed85c705557692f8aa5e21e1a36
commit 245dde21c5fe21ce4b01f646cfd61ee66e3facdd
Author: Daniele Forsi <address@hidden>
Date: Tue May 10 13:50:49 2011 +0200
Fix some "variable set but not used" warnings
Fixes:
nk7110.c:685:16: warning: variable 'subblockcount' set but not used
[-Wunused-but-set-variable]
nk7110.c:683:17: warning: variable 'blockstart' set but not used
[-Wunused-but-set-variable]
nk7110.c:1666:9: warning: variable 'year' set but not used
[-Wunused-but-set-variable]
nk7110.c:2183:26: warning: variable 'pad' set but not used
[-Wunused-but-set-variable]
nk6510.c:1460:11: warning: variable 'error' set but not used
[-Wunused-but-set-variable]
nk6510.c:1645:22: warning: variable 'tota_len' set but not used
[-Wunused-but-set-variable]
nk6510.c:2546:16: warning: variable 'fll' set but not used
[-Wunused-but-set-variable]
nk6510.c:2544:12: warning: variable 'frame_length' set but not used
[-Wunused-but-set-variable]
gsm-sms.c:1596:9: warning: variable 'sms' set but not used
[-Wunused-but-set-variable]
xgnokii.c:2146:9: warning: variable âgcâ set but not used
[-Wunused-but-set-variable]
xgnokii.c:2243:9: warning: variable âgcâ set but not used
[-Wunused-but-set-variable]
Does NOT fix:
nk3110.c:968:13: warning: variable 'U2' set but not used
[-Wunused-but-set-variable]
nk3110.c:968:9: warning: variable 'U1' set but not used
[-Wunused-but-set-variable]
nk3110.c:968:5: warning: variable 'U0' set but not used
[-Wunused-but-set-variable]
nk3110.c:1230:34: warning: variable 'model_length' set but not used
[-Wunused-but-set-variable]
gsm-mms.c:574:38: warning: variable 'pdu_start' set but not used
[-Wunused-but-set-variable]
gnokii-sms.c:274:8: warning: variable âchars_readâ set but not used
[-Wunused-but-set-variable]
diff --git a/common/gsm-sms.c b/common/gsm-sms.c
index a692c9c..7c6aa02 100644
--- a/common/gsm-sms.c
+++ b/common/gsm-sms.c
@@ -1593,14 +1593,12 @@ GNOKII_API gn_error gn_sms_send(gn_data *data, struct
gn_statemachine *state)
{
int i, total;
int enc_chars, ext_chars;
- gn_sms sms;
dprintf("=====> ENTER gn_sms_send()\n");
/*
* count -- number of SMS to be sent
* total -- total number of octets to be sent
*/
- sms = *data->sms;
/* Convert all the input strings to UTF-8 */
if (data->sms->dcs.u.general.alphabet != GN_SMS_DCS_8bit) {
diff --git a/common/phones/nk6510.c b/common/phones/nk6510.c
index 9d54b80..c22801e 100644
--- a/common/phones/nk6510.c
+++ b/common/phones/nk6510.c
@@ -1462,6 +1462,8 @@ static gn_error NK6510_GetSMSnoValidate(gn_data *data,
struct gn_statemachine *s
dprintf("Getting SMS (no validate) ...\n");
error = NK6510_GetSMSMessageStatus(data, state);
+ if (error)
+ return error;
if ((data->raw_sms->memory_type == GN_MT_IN) ||
(data->raw_sms->memory_type == GN_MT_OU)) {
if (data->raw_sms->number > 1024) {
@@ -2543,7 +2545,6 @@ static gn_error NK6510_IncomingFile(int messagetype,
unsigned char *message, int
{
int i, j, frame_length;
gn_file *file = NULL;
- gn_file_list *fll;
gn_error error = GN_ERR_NONE;
switch (message[3]) {
@@ -2580,7 +2581,6 @@ static gn_error NK6510_IncomingFile(int messagetype,
unsigned char *message, int
/* frame length */
frame_length = 256 * message[8] + message[9];
file = data->file;
- fll = data->file_list;
char_unicode_decode(file->name, message + 10, 184);
dprintf("Filename: %s\n", file->name);
if (message[196] != 0xff) {
diff --git a/common/phones/nk7110.c b/common/phones/nk7110.c
index 9aeb84f..c1dffe2 100644
--- a/common/phones/nk7110.c
+++ b/common/phones/nk7110.c
@@ -682,7 +682,6 @@ static gn_error NK7110_IncomingPhonebook(int messagetype,
unsigned char *message
nk7110_driver_instance *drvinst = DRVINSTANCE(state);
unsigned char *blockstart;
unsigned char blocks;
- unsigned char subblockcount;
int memtype, location, memtype_req;
switch (message[3]) {
@@ -752,8 +751,7 @@ static gn_error NK7110_IncomingPhonebook(int messagetype,
unsigned char *message
dprintf("Received phonebook info\n");
blocks = message[17];
blockstart = message + 18;
- subblockcount = 0;
- return phonebook_decode(message + 18, length - 17, data,
blocks, message[11], 8);
+ return phonebook_decode(blockstart, length - 17, data, blocks,
message[11], 8);
case 0x0c:
if (message[6] == 0x0f) {
switch (message[10]) {
@@ -1663,11 +1661,10 @@ static gn_error NK7110_SetAlarm(gn_data *data, struct
gn_statemachine *state)
static gn_error NK7110_IncomingCalendar(int messagetype, unsigned char
*message, int length, gn_data *data, struct gn_statemachine *state)
{
gn_error e = GN_ERR_NONE;
- int i, year;
+ int i;
if (!data || !data->calnote) return GN_ERR_INTERNALERROR;
- year = data->calnote->time.year;
switch (message[3]) {
case NK7110_SUBCAL_NOTE_RCVD:
calnote_decode(message, length, data);
@@ -2180,7 +2177,7 @@ static gn_error NK7110_IncomingSecurity(int messagetype,
unsigned char *message,
/*****************/
static gn_error NK7110_IncomingWAP(int messagetype, unsigned char *message,
int length, gn_data *data, struct gn_statemachine *state)
{
- int string_length, pos, pad = 0;
+ int string_length, pos;
switch (message[3]) {
case 0x02:
@@ -2245,7 +2242,6 @@ static gn_error NK7110_IncomingWAP(int messagetype,
unsigned char *message, int
char_unicode_decode(data->wap_setting->name, message +
5, string_length);
dprintf("Name: %s\n", data->wap_setting->name);
pos = string_length + 5;
- if (!(string_length % 4)) pad = 1;
string_length = message[pos++] << 1;
if (!data->wap_setting->read_before_write)
diff --git a/xgnokii/xgnokii.c b/xgnokii/xgnokii.c
index 9c933cc..def5af4 100644
--- a/xgnokii/xgnokii.c
+++ b/xgnokii/xgnokii.c
@@ -2142,8 +2142,6 @@ static void TopLevelWindow(void)
{
GtkWidget *drawing_area;
GdkBitmap *mask;
- GtkStyle *style;
- GdkGC *gc;
struct sigaction act;
GUI_MainWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);
@@ -2168,8 +2166,6 @@ static void TopLevelWindow(void)
&GUI_MainWindow->style->white, (gchar
**) XPM_background);
// gdk_window_set_icon_name (GUI_MainWindow->window, "XXX");
- style = gtk_widget_get_default_style();
- gc = style->black_gc;
/* Create the drawing area */
drawing_area = gtk_drawing_area_new();
@@ -2240,7 +2236,6 @@ static void SplashScreen(void)
GdkPixmap *gdk_pixmap;
GdkBitmap *mask;
GtkStyle *style;
- GdkGC *gc;
SplashWindow = gtk_window_new(GTK_WINDOW_POPUP);
gtk_widget_realize(SplashWindow);
@@ -2249,7 +2244,6 @@ static void SplashScreen(void)
gtk_window_position(GTK_WINDOW(SplashWindow), GTK_WIN_POS_CENTER);
style = gtk_widget_get_default_style();
- gc = style->black_gc;
gdk_pixmap = gdk_pixmap_create_from_xpm_d(SplashWindow->window, &mask,
&style->bg[GTK_STATE_NORMAL],
XPM_logo);
pixmap = gtk_pixmap_new(gdk_pixmap, mask);
-----------------------------------------------------------------------
Summary of changes:
INSTALL | 16 ++++++++++++++++
common/gsm-sms.c | 2 --
common/phones/nk6510.c | 4 ++--
common/phones/nk7110.c | 10 +++-------
xgnokii/xgnokii.c | 6 ------
5 files changed, 21 insertions(+), 17 deletions(-)
hooks/post-receive
--
libgnokii and core programs
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-217-g245dde2,
Daniele Forsi <=